ecc_encryption 0.0.2 copy "ecc_encryption: ^0.0.2" to clipboard
ecc_encryption: ^0.0.2 copied to clipboard

Elliptic curve cryptography functions in Dart. Private Key, Public Key, Encryption, Decryption

example/ecc_encryption_example.dart

import 'package:ecc_encryption/ecc_encryption.dart';

void main(){
  ECCEncryptionSample().getKeys();
}

class ECCEncryptionSample {
  ECC ecc = ECC.initialise(wifPrivateKey: 'KwcZLfpPXciZeqY9gR73yMzgZag4TSw3ekhyF1rstzeyi7kWnMTV');

  getKeys(){
    print('Private Key: ${ecc.privateKey}');
    print('Public Key: ${ecc.publicKey}');
    encrypt();
  }

  encrypt(){
    String message = 'Hello World';
    String? encrypted = ecc.encrypt(data: message);
    print('Encrypted: $encrypted');
    print('Decrypted: ${decrypt(encrypted ?? '')}');
  }

  decrypt(String message){
    return ecc.decrypt(data: message);
  }
}
0
likes
150
points
17
downloads

Publisher

verified publisheravinashgotluru.me

Weekly Downloads

Elliptic curve cryptography functions in Dart. Private Key, Public Key, Encryption, Decryption

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

encrypt, eosdart_ecc, flutter

More

Packages that depend on ecc_encryption