diff options
Diffstat (limited to 'python/olm/__main__.py')
-rwxr-xr-x | python/olm/__main__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/olm/__main__.py b/python/olm/__main__.py index 71f018a..2a48b78 100755 --- a/python/olm/__main__.py +++ b/python/olm/__main__.py @@ -344,6 +344,9 @@ def build_arg_parser(): ) export_inbound_group.set_defaults(func=do_export_inbound_group) + ed25519_verify = commands.add_parser("ed25519_verify", + help="Verify an ed25519 signature") + ed25519_verify.set_defaults(func=do_verify_ed25519_signature) return parser @@ -430,6 +433,15 @@ def do_export_inbound_group(args): args.export_file.write(session.export_session(index)) +def do_verify_ed25519_signature(args): + account = Account() + account.create() + message = "A Message".encode("ASCII") + ed25519_key = account.identity_keys()["ed25519"].encode("utf-8") + signature = account.sign(message) + ed25519_verify(ed25519_key, message, signature) + + if __name__ == '__main__': parser = build_arg_parser() args = parser.parse_args() |