mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 07:05:50 +01:00
| .. | ||
| hashes.d.ts | ||
| hashes.js | ||
| plugin.go | ||
| plugin.toml | ||
| README.md | ||
Hashes Plugin
This example plugin provides a way to generate hashes of strings.
Usage
Add the plugin to the Plugins option in the Applications options:
Plugins: map[string]application.Plugin{
"hashes": hashes.NewPlugin(),
},
You can then call the Generate method from the frontend:
wails.Plugin("hashes","Generate","hello world").then((result) => console.log(result))
This method returns a struct with the following fields:
interface Hashes {
md5: string;
sha1: string;
sha256: string;
}
A TypeScript definition file is provided for this interface.