Secp256 class

Constructors

Secp256(ECDomainParametersImpl _ecDomainParams)
Secp256.fromSecp256k1()
factory
Secp256.fromSecp256r1()
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

ecRecover(int recId, Uint8List messageHash, SignatureData signature, [bool isCompressed = false, bool isEthereum = false]) → Uint8List
Recover the signing public key from a message hash and signature. https://github.com/web3j/web3j/blob/c0b7b9c2769a466215d416696021aa75127c2ff1/crypto/src/main/java/org/web3j/crypto/Sign.java#L241
generateKeypair([SecureRandom? random]) → AsymmetricKeyPair<PublicKey, PrivateKey>
generatePrivateKey([SecureRandom? random]) → BigInt
generatePrivateKeyBytes([SecureRandom? random]) → Uint8List
getPublicKey(BigInt privateKey, [bool isCompressed = true]) → Uint8List
If isCompressed is true, return public key length is 33 (flag + x), otherwise, public key length is 64 (x + y)
getPublicKeyFromPrivateKeyBytes(Uint8List privateKey, [bool isCompressed = true]) → Uint8List
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recoverFromSignature(int recId, ECSignature sig, Uint8List msg, [bool encoded = false]) → Uint8List?
recoveryId(ECSignature signature, Uint8List messageHash, Uint8List publicKeyBytes) → int
sign(Uint8List messageHash, Uint8List privateKey, [bool isEthereum = false]) → SignatureData
toString() → String
A string representation of this object.
inherited
verifySignature(Uint8List messageHash, SignatureData signature, Uint8List publicKey) → bool

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

magicNum → const int