Interface ICryptoBackend<T>
Cryptography backend interface.
Namespace: Libplanet.Crypto
Assembly: Libplanet.Crypto.dll
Syntax
public interface ICryptoBackend<T>
where T : HashAlgorithm
Type Parameters
Name | Description |
---|---|
T | A |
Methods
| Improve this Doc View SourceSign(HashDigest<T>, PrivateKey)
Creates a signature from messageHash
with the corresponding
privateKey
.
Declaration
byte[] Sign(HashDigest<T> messageHash, PrivateKey privateKey)
Parameters
Type | Name | Description |
---|---|---|
Hash |
messageHash | A 32 bytes message hash digest hashed with SHA256 to sign. |
Private |
privateKey | Private |
Returns
Type | Description |
---|---|
System. |
Created a signature from |
Verify(HashDigest<T>, Byte[], PublicKey)
Verifies whether a signature
was created from
a messageHash
with the corresponding Private
Declaration
bool Verify(HashDigest<T> messageHash, byte[] signature, PublicKey publicKey)
Parameters
Type | Name | Description |
---|---|---|
Hash |
messageHash | A 32 bytes message hash digest hashed with SHA256. |
System. |
signature | A signature that was created from the
|
Public |
publicKey | Public |
Returns
Type | Description |
---|---|
System. |
true if the |