({data, keyring, unlockKey, signingKeyFpr})
| 94 | * @return {String} |
| 95 | */ |
| 96 | export async function sign({data, keyring, unlockKey, signingKeyFpr}) { |
| 97 | const message = await createCleartextMessage({text: data}); |
| 98 | let signingKey = keyring.getPrivateKeyByIds(signingKeyFpr); |
| 99 | signingKey = await unlockKey({key: signingKey}); |
| 100 | const result = await pgpSign({message, signingKeys: [signingKey]}); |
| 101 | return result; |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Verify message |
nothing calls this directly
no test coverage detected