ed25519_edwards 0.0.3 ed25519_edwards: ^0.0.3 copied to clipboard
A Dart implementation of ed25519, inspired by Go cryptography libraries.
A Dart implementation of ed25519, inspired by Go cryptography libraries
Usage
test('testSignVerify', () {
var keyPair = generateKey();
var privateKey = keyPair.privateKey;
var publicKey = keyPair.publicKey;
var message = utf8.encode('test message');
var sig = sign(privateKey, message);
var result = verify(publicKey, message, sig);
assert(result == true);
var wrongMessage = utf8.encode('wrong message');
var wrongResult = verify(publicKey, wrongMessage, sig);
assert(wrongResult == false);
});