SVSignature.fromPrivateKey constructor

SVSignature.fromPrivateKey(
  1. SVPrivateKey privateKey
)

Construct a signature instance from a PrivateKey for signing purposes.

Implementation

SVSignature.fromPrivateKey(SVPrivateKey privateKey) {
    ECPrivateKey privKey =  ECPrivateKey(privateKey.privateKey, _domainParams);

    _privateKey = privateKey;
    _compressed = privateKey.isCompressed;

    _dsaSigner.init(true, PrivateKeyParameter(privKey));
}