Interface ICryptoContext
Assembly: Catalyst.Abstractions.dll
Syntax
public interface ICryptoContext
Properties
|
Improve this Doc
View Source
PrivateKeyLength
Declaration
int PrivateKeyLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
PublicKeyLength
Declaration
int PublicKeyLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
SignatureContextMaxLength
Declaration
int SignatureContextMaxLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
SignatureLength
Declaration
int SignatureLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
ExportPrivateKey(IPrivateKey)
Returns private key bytes.
Declaration
byte[] ExportPrivateKey(IPrivateKey privateKey)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
ExportPublicKey(IPublicKey)
Returns public key bytes.
Declaration
byte[] ExportPublicKey(IPublicKey publicKey)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GeneratePrivateKey()
Generates a new private key.
Declaration
IPrivateKey GeneratePrivateKey()
Returns
|
Improve this Doc
View Source
GetPrivateKeyFromBytes(Byte[])
Creates private key from key bytes.
Declaration
IPrivateKey GetPrivateKeyFromBytes(byte[] privateKeyBytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
privateKeyBytes |
|
Returns
|
Improve this Doc
View Source
GetPublicKeyFromBytes(Byte[])
Creates public key from public key bytes.
Declaration
IPublicKey GetPublicKeyFromBytes(byte[] publicKeyBytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
publicKeyBytes |
|
Returns
|
Improve this Doc
View Source
GetPublicKeyFromPrivateKey(IPrivateKey)
Given a private key returns corresponding public key.
Declaration
IPublicKey GetPublicKeyFromPrivateKey(IPrivateKey privateKey)
Parameters
Returns
|
Improve this Doc
View Source
GetSignatureFromBytes(Byte[], Byte[])
Takes signature bytes and corresponding public key bytes and creates a signature.
Declaration
ISignature GetSignatureFromBytes(byte[] signatureBytes, byte[] publicKeyBytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
signatureBytes |
|
System.Byte[] |
publicKeyBytes |
|
Returns
|
Improve this Doc
View Source
Sign(IPrivateKey, Byte[], Byte[])
Signs message using provided private key and returns the signature.
Declaration
ISignature Sign(IPrivateKey privateKey, byte[] message, byte[] context)
Parameters
Type |
Name |
Description |
IPrivateKey |
privateKey |
|
System.Byte[] |
message |
|
System.Byte[] |
context |
|
Returns
|
Improve this Doc
View Source
Verify(ISignature, Byte[], Byte[])
Declaration
bool Verify(ISignature signature, byte[] message, byte[] context)
Parameters
Type |
Name |
Description |
ISignature |
signature |
|
System.Byte[] |
message |
|
System.Byte[] |
context |
|
Returns
Type |
Description |
System.Boolean |
|