Method | Description | |
---|---|---|
EcKey ( |
Creates an ECKey given only the private key. This works because EC public keys are derivable from their private keys by doing a multiply with the generator value.
|
|
FromAsn1 ( byte asn1PrivKey ) : |
Construct an ECKey from an ASN.1 encoded private key. These are produced by OpenSSL and stored by the BitCoin reference implementation in its wallet.
|
|
GetPrivKeyBytes ( ) : byte[] |
Returns a 32 byte array containing the private key.
|
|
GetPrivateKeyEncoded ( |
Exports the private key in the form used by the Satoshi client "dumpprivkey" and "importprivkey" commands. Use the DumpedPrivateKey.ToString method to get the string.
|
|
Sign ( byte input ) : byte[] |
Calculates an ECDSA signature in DER format for the given input hash. Note that the input is expected to be 32 bytes long.
|
|
ToAddress ( |
Returns the address that corresponds to the public part of this ECKey. Note that an address is derived from the RIPEMD-160 hash of the public key and is not the public key itself (which is too large to be convenient).
|
|
ToAsn1 ( ) : byte[] |
Output this ECKey as an ASN.1 encoded private key, as understood by OpenSSL or used by the BitCoin reference implementation in its wallet storage format.
|
|
ToString ( ) : string | ||
Verify ( byte data, byte signature ) : bool |
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
|
|
Verify ( byte data, byte signature, byte pub ) : bool |
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
|
Method | Description | |
---|---|---|
EcKey ( ) : System | ||
ExtractPrivateKeyFromAsn1 ( byte asn1PrivKey ) : |
||
PublicKeyFromPrivate ( |
Derive the public key by doing a point multiply of G * priv.
|
public EcKey ( |
||
privKey | ||
return | System |
public static FromAsn1 ( byte asn1PrivKey ) : |
||
asn1PrivKey | byte | |
return |
public GetPrivateKeyEncoded ( |
||
@params | ||
return |
public ToAddress ( |
||
@params | ||
return |
public Verify ( byte data, byte signature ) : bool | ||
data | byte | Hash of the data to verify. |
signature | byte | ASN.1 encoded signature. |
return | bool |
public static Verify ( byte data, byte signature, byte pub ) : bool | ||
data | byte | Hash of the data to verify. |
signature | byte | ASN.1 encoded signature. |
pub | byte | The public key bytes to use. |
return | bool |