Show / Hide Table of Contents

    Interface ICryptoContext

    Namespace: Catalyst.Abstractions.Cryptography
    Assembly: Catalyst.Abstractions.dll
    Syntax
    public interface ICryptoContext

    Properties

    | Improve this Doc View Source

    PrivateKeyLength

    Private key byte length.

    Declaration
    int PrivateKeyLength { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    PublicKeyLength

    Public key byte length.

    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

    Signature byte length.

    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
    Type Name Description
    IPrivateKey privateKey
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    ExportPublicKey(IPublicKey)

    Returns public key bytes.

    Declaration
    byte[] ExportPublicKey(IPublicKey publicKey)
    Parameters
    Type Name Description
    IPublicKey publicKey
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    GeneratePrivateKey()

    Generates a new private key.

    Declaration
    IPrivateKey GeneratePrivateKey()
    Returns
    Type Description
    IPrivateKey
    | 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
    Type Description
    IPrivateKey
    | 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
    Type Description
    IPublicKey
    | Improve this Doc View Source

    GetPublicKeyFromPrivateKey(IPrivateKey)

    Given a private key returns corresponding public key.

    Declaration
    IPublicKey GetPublicKeyFromPrivateKey(IPrivateKey privateKey)
    Parameters
    Type Name Description
    IPrivateKey privateKey
    Returns
    Type Description
    IPublicKey
    | 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
    Type Description
    ISignature
    | 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
    Type Description
    ISignature
    | 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
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Catalyst Network