C# Class NBitcoin.Crypto.ECKey

Show file Open project: Nethereum/Nethereum Class Usage Examples

Public Properties

Property Type Description
CURVE Org.BouncyCastle.Crypto.Parameters.ECDomainParameters
CURVE_ORDER Org.BouncyCastle.Math.BigInteger
HALF_CURVE_ORDER Org.BouncyCastle.Math.BigInteger
_Secp256k1 Org.BouncyCastle.Asn1.X9.X9ECParameters

Public Methods

Method Description
ECKey ( byte vch, bool isPrivate ) : System
GetPubKey ( bool isCompressed ) : byte[]
GetPublicKeyParameters ( ) : ECPublicKeyParameters
RecoverFromSignature ( int recId, ECDSASignature sig, byte message, bool compressed ) : ECKey
Sign ( byte hash ) : ECDSASignature
Verify ( byte hash, ECDSASignature sig ) : bool

Private Methods

Method Description
AssertPrivateKey ( ) : void
DecompressKey ( BigInteger xBN, bool yBit ) : ECPoint
ECKey ( ) : System

Method Details

ECKey() public method

public ECKey ( byte vch, bool isPrivate ) : System
vch byte
isPrivate bool
return System

GetPubKey() public method

public GetPubKey ( bool isCompressed ) : byte[]
isCompressed bool
return byte[]

GetPublicKeyParameters() public method

public GetPublicKeyParameters ( ) : ECPublicKeyParameters
return Org.BouncyCastle.Crypto.Parameters.ECPublicKeyParameters

RecoverFromSignature() public static method

public static RecoverFromSignature ( int recId, ECDSASignature sig, byte message, bool compressed ) : ECKey
recId int
sig ECDSASignature
message byte
compressed bool
return ECKey

Sign() public method

public Sign ( byte hash ) : ECDSASignature
hash byte
return ECDSASignature

Verify() public method

public Verify ( byte hash, ECDSASignature sig ) : bool
hash byte
sig ECDSASignature
return bool

Property Details

CURVE public static property

public static ECDomainParameters,Org.BouncyCastle.Crypto.Parameters CURVE
return Org.BouncyCastle.Crypto.Parameters.ECDomainParameters

CURVE_ORDER public static property

public static BigInteger,Org.BouncyCastle.Math CURVE_ORDER
return Org.BouncyCastle.Math.BigInteger

HALF_CURVE_ORDER public static property

public static BigInteger,Org.BouncyCastle.Math HALF_CURVE_ORDER
return Org.BouncyCastle.Math.BigInteger

_Secp256k1 public static property

public static X9ECParameters,Org.BouncyCastle.Asn1.X9 _Secp256k1
return Org.BouncyCastle.Asn1.X9.X9ECParameters