Sailfish-secrets called from QML?

Is there any documentation or examples or anything? The docs seem to suggest this is so laymen don’t need to worry about cryptography. How do you call it to generate a keypair or decode something with a private key? Is it possible from qml only?

1 Like

I’d also like to know if this is possible. Have tried working with the source on GitHub and, as of now, it’s somewhat beyond my skill level. A QML implementation would be awesome.

1 Like

There is a PR with QML example: https://github.com/sailfishos/sailfish-secrets/pull/173
Maybe you’ll have better luck getting it to run, as no matter what BuildRequires/Requires I add in the .spec the example fails with:

module "Sailfish.Crypto" is not installed 
module "Sailfish.Secrets" is not installed 

(actually any .qml file does when you include the ‘import Sailfish.Secrets 1.0 as Secrets’ and ‘import Sailfish.Crypto 1.0 as Crypto’ part, whether on device or in emulator)

For Secrets, you need the following package : libsailfishsecretsplugin and for Crypto, it’s libsailfishcryptoplugin.

2 Likes