C# Class ECLibrary.Signer.Crypto.ECKey

显示文件 Open project: cybergibbons/bitfi_09072019 Class Usage Examples

Public Properties

Property Type Description
CURVE ECDomainParameters
CURVE_ORDER BigInteger
HALF_CURVE_ORDER BigInteger
PrivateKey ECPrivateKeyParameters
Secp256k1 X9ECParameters
_Secp256k1 X9ECParameters

Public Methods

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

Private Methods

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

Method Details

ECKey() public method

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

GetPubKey() public method

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

GetPublicKeyParameters() public method

public GetPublicKeyParameters ( ) : ECPublicKeyParameters
return ECPublicKeyParameters

RecoverFromSignature() public static method

public static RecoverFromSignature ( int recId, ECLibrary.Signer.Crypto.ECDSASignature sig, Array message, bool compressed ) : ECKey
recId int
sig ECLibrary.Signer.Crypto.ECDSASignature
message Array
compressed bool
return ECKey

Sign() public method

public Sign ( Array hash ) : ECLibrary.Signer.Crypto.ECDSASignature
hash Array
return ECLibrary.Signer.Crypto.ECDSASignature

Verify() public method

public Verify ( Array hash, ECLibrary.Signer.Crypto.ECDSASignature sig ) : bool
hash Array
sig ECLibrary.Signer.Crypto.ECDSASignature
return bool

Property Details

CURVE public_oe static_oe property

public static ECDomainParameters CURVE
return ECDomainParameters

CURVE_ORDER public_oe static_oe property

public static BigInteger CURVE_ORDER
return BigInteger

HALF_CURVE_ORDER public_oe static_oe property

public static BigInteger HALF_CURVE_ORDER
return BigInteger

PrivateKey public_oe property

public ECPrivateKeyParameters PrivateKey
return ECPrivateKeyParameters

Secp256k1 public_oe static_oe property

public static X9ECParameters Secp256k1
return X9ECParameters

_Secp256k1 public_oe static_oe property

public static X9ECParameters _Secp256k1
return X9ECParameters