This exposes the function to sign messages with Olm account to JS. This is a counterpart of Account.sign() on web/keyserver.
Details
Details
Used online Ed25519 tool to verify generated values:
await commCoreModule.initializeCryptoAccount(); // used primaryIdentityPublicKeys.ed25519 const keys = await commCoreModule.getUserPublicKey(); const message = JSON.stringify({ hello: 'world '}); const signature = await commCoreModule.signMessage(message); console.log({ keys, message, signature });
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
Used online Ed25519 tool to verify generated values:
I prefer to use our JS olm version - you can easily test it by adding a simple couple of lines in olm-utils.test.js, but in terms of verifying this is also okay to use this tool though.
native/cpp/CommonCpp/NativeModules/CommCoreModule.h | ||
---|---|---|
142 ↗ | (On Diff #36995) | it's already messed but could you move it above to group it with other crypt-related functions (after the decrypt() for example) |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
1470 ↗ | (On Diff #36995) | You can immediately reject the promise here and early return. It will allow you to reduce indentation when you call cryptoModule. It is our convention to avoid indentation. |