КриптоПро .NET
Search Results for

    Показать/Скрыть содержание

    Class Gost3410Algorithm

    Represents the abstract class from which asymmetric algorithms can inherit.

    Inheritance
    object
    AsymmetricAlgorithm
    Gost3410Algorithm
    Gost3410
    Gost3410_2012_256
    Gost3410_2012_512
    Implements
    IDisposable
    Inherited Members
    AsymmetricAlgorithm.KeySizeValue
    AsymmetricAlgorithm.LegalKeySizesValue
    AsymmetricAlgorithm.Clear()
    AsymmetricAlgorithm.Create()
    AsymmetricAlgorithm.Create(string)
    AsymmetricAlgorithm.Dispose()
    AsymmetricAlgorithm.Dispose(bool)
    AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte>, PbeParameters)
    AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char>, PbeParameters)
    AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<byte>, PbeParameters)
    AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<char>, PbeParameters)
    AsymmetricAlgorithm.ExportPkcs8PrivateKey()
    AsymmetricAlgorithm.ExportPkcs8PrivateKeyPem()
    AsymmetricAlgorithm.ExportSubjectPublicKeyInfo()
    AsymmetricAlgorithm.ExportSubjectPublicKeyInfoPem()
    AsymmetricAlgorithm.FromXmlString(string)
    AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte>, ReadOnlySpan<byte>, out int)
    AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char>, ReadOnlySpan<byte>, out int)
    AsymmetricAlgorithm.ImportFromEncryptedPem(ReadOnlySpan<char>, ReadOnlySpan<byte>)
    AsymmetricAlgorithm.ImportFromEncryptedPem(ReadOnlySpan<char>, ReadOnlySpan<char>)
    AsymmetricAlgorithm.ImportFromPem(ReadOnlySpan<char>)
    AsymmetricAlgorithm.ImportPkcs8PrivateKey(ReadOnlySpan<byte>, out int)
    AsymmetricAlgorithm.ImportSubjectPublicKeyInfo(ReadOnlySpan<byte>, out int)
    AsymmetricAlgorithm.ToXmlString(bool)
    AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte>, PbeParameters, Span<byte>, out int)
    AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char>, PbeParameters, Span<byte>, out int)
    AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<byte>, PbeParameters, Span<char>, out int)
    AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<char>, PbeParameters, Span<char>, out int)
    AsymmetricAlgorithm.TryExportPkcs8PrivateKey(Span<byte>, out int)
    AsymmetricAlgorithm.TryExportPkcs8PrivateKeyPem(Span<char>, out int)
    AsymmetricAlgorithm.TryExportSubjectPublicKeyInfo(Span<byte>, out int)
    AsymmetricAlgorithm.TryExportSubjectPublicKeyInfoPem(Span<char>, out int)
    AsymmetricAlgorithm.KeyExchangeAlgorithm
    AsymmetricAlgorithm.SignatureAlgorithm
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: CryptoPro.Security.Cryptography
    Assembly: CryptoPro.Security.Cryptography.dll
    Syntax
    public abstract class Gost3410Algorithm : AsymmetricAlgorithm, IDisposable

    Properties

    HashAlgorithmName

    Gets or sets the hash algorithm to use when signing and verifying data.

    Declaration
    protected abstract CpHashAlgorithmName HashAlgorithmName { get; }
    Property Value
    Type Description
    CpHashAlgorithmName

    HashSizeInBytes

    Gets the hash value size in bytes.

    Declaration
    protected abstract int HashSizeInBytes { get; }
    Property Value
    Type Description
    int

    KeySize

    Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.

    Declaration
    public override sealed int KeySize { get; set; }
    Property Value
    Type Description
    int

    The size, in bits, of the key modulus used by the asymmetric algorithm.

    Overrides
    AsymmetricAlgorithm.KeySize
    Exceptions
    Type Condition
    CryptographicException

    The key modulus size is invalid.

    KeySizeInBits

    Gets the key size in bits.

    Declaration
    protected abstract int KeySizeInBits { get; }
    Property Value
    Type Description
    int

    LegalKeySizes

    Gets the key sizes that are supported by the asymmetric algorithm.

    Declaration
    public override sealed KeySizes[] LegalKeySizes { get; }
    Property Value
    Type Description
    KeySizes[]

    An array that contains the key sizes supported by the asymmetric algorithm.

    Overrides
    AsymmetricAlgorithm.LegalKeySizes

    SignatureSizeInBytes

    Gets the signature value size in bytes.

    Declaration
    protected virtual int SignatureSizeInBytes { get; }
    Property Value
    Type Description
    int

    Methods

    CreateAgree(Gost3410Parameters)

    Declaration
    public abstract GostSharedSecretAlgorithm CreateAgree(Gost3410Parameters alg)
    Parameters
    Type Name Description
    Gost3410Parameters alg
    Returns
    Type Description
    GostSharedSecretAlgorithm

    HashData(byte[], int, int)

    Declaration
    protected virtual byte[] HashData(byte[] data, int offset, int count)
    Parameters
    Type Name Description
    byte[] data
    int offset
    int count
    Returns
    Type Description
    byte[]

    HashData(Stream)

    Declaration
    protected virtual byte[] HashData(Stream data)
    Parameters
    Type Name Description
    Stream data
    Returns
    Type Description
    byte[]

    ImportPublicKey(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

    Imports encoded public key.

    Declaration
    public abstract void ImportPublicKey(ReadOnlySpan<byte> encodedPublicKey, ReadOnlySpan<byte> encodedParameters)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> encodedPublicKey

    The encoded public key.

    ReadOnlySpan<byte> encodedParameters

    The encoded parameters.

    SignData(byte[])

    Declaration
    public virtual byte[] SignData(byte[] data)
    Parameters
    Type Name Description
    byte[] data
    Returns
    Type Description
    byte[]

    SignData(byte[], int, int)

    Declaration
    public virtual byte[] SignData(byte[] data, int offset, int count)
    Parameters
    Type Name Description
    byte[] data
    int offset
    int count
    Returns
    Type Description
    byte[]

    SignData(Stream)

    Declaration
    public virtual byte[] SignData(Stream data)
    Parameters
    Type Name Description
    Stream data
    Returns
    Type Description
    byte[]

    SignData(ReadOnlySpan<byte>)

    Declaration
    public virtual byte[] SignData(ReadOnlySpan<byte> data)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data
    Returns
    Type Description
    byte[]

    SignData(ReadOnlySpan<byte>, Span<byte>)

    Computes the hash value of the specified data and signs it in the indicated format into the provided buffer.

    Declaration
    public virtual int SignData(ReadOnlySpan<byte> data, Span<byte> destination)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data

    The data to hash and sign.

    Span<byte> destination

    The buffer to receive the signature.

    Returns
    Type Description
    int

    The total number of bytes written to destination.

    Exceptions
    Type Condition
    ArgumentException

    The buffer in destination is too small to hold the signature.

    SignDataCore(ReadOnlySpan<byte>)

    Declaration
    protected virtual byte[] SignDataCore(ReadOnlySpan<byte> data)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data
    Returns
    Type Description
    byte[]

    SignHash(byte[])

    Declaration
    public virtual byte[] SignHash(byte[] hash)
    Parameters
    Type Name Description
    byte[] hash
    Returns
    Type Description
    byte[]

    SignHash(ReadOnlySpan<byte>)

    Declaration
    public virtual byte[] SignHash(ReadOnlySpan<byte> hash)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash
    Returns
    Type Description
    byte[]

    SignHash(ReadOnlySpan<byte>, Span<byte>)

    Declaration
    public virtual int SignHash(ReadOnlySpan<byte> hash, Span<byte> destination)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash
    Span<byte> destination
    Returns
    Type Description
    int

    SignHashCore(ReadOnlySpan<byte>)

    Computes the ECDSA signature for the specified hash value in the indicated format.

    Declaration
    protected virtual byte[] SignHashCore(ReadOnlySpan<byte> hash)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash

    The hash value to sign.

    Returns
    Type Description
    byte[]

    The ECDSA signature for the specified data.

    Exceptions
    Type Condition
    CryptographicException

    An error occurred in the signing operation.

    TryHashData(ReadOnlySpan<byte>, Span<byte>, out int)

    Declaration
    protected virtual bool TryHashData(ReadOnlySpan<byte> data, Span<byte> destination, out int bytesWritten)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data
    Span<byte> destination
    int bytesWritten
    Returns
    Type Description
    bool

    TrySignData(ReadOnlySpan<byte>, Span<byte>, out int)

    Declaration
    public virtual bool TrySignData(ReadOnlySpan<byte> data, Span<byte> destination, out int bytesWritten)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data
    Span<byte> destination
    int bytesWritten
    Returns
    Type Description
    bool

    TrySignDataCore(ReadOnlySpan<byte>, Span<byte>, out int)

    Attempts to create the ECDSA signature for the specified data in the indicated format into the provided buffer.

    Declaration
    protected virtual bool TrySignDataCore(ReadOnlySpan<byte> data, Span<byte> destination, out int bytesWritten)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data

    The data to hash and sign.

    Span<byte> destination

    The buffer to receive the signature.

    int bytesWritten

    When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized.

    Returns
    Type Description
    bool

    true if destination is big enough to receive the signature; otherwise, false.

    Exceptions
    Type Condition
    CryptographicException

    An error occurred in the signing operation.

    TrySignHash(ReadOnlySpan<byte>, Span<byte>, out int)

    Declaration
    public virtual bool TrySignHash(ReadOnlySpan<byte> hash, Span<byte> destination, out int bytesWritten)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash
    Span<byte> destination
    int bytesWritten
    Returns
    Type Description
    bool

    TrySignHashCore(ReadOnlySpan<byte>, Span<byte>, out int)

    Attempts to create the ECDSA signature for the specified hash value in the indicated format into the provided buffer.

    Declaration
    protected abstract bool TrySignHashCore(ReadOnlySpan<byte> hash, Span<byte> destination, out int bytesWritten)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash

    The hash value to sign.

    Span<byte> destination

    The buffer to receive the signature.

    int bytesWritten

    When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized.

    Returns
    Type Description
    bool

    true if destination is big enough to receive the signature; otherwise, false.

    Exceptions
    Type Condition
    CryptographicException

    An error occurred in the signing operation.

    VerifyData(byte[], byte[])

    Declaration
    public virtual bool VerifyData(byte[] data, byte[] signature)
    Parameters
    Type Name Description
    byte[] data
    byte[] signature
    Returns
    Type Description
    bool

    VerifyData(byte[], int, int, byte[])

    Declaration
    public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature)
    Parameters
    Type Name Description
    byte[] data
    int offset
    int count
    byte[] signature
    Returns
    Type Description
    bool

    VerifyData(Stream, byte[])

    Declaration
    public virtual bool VerifyData(Stream data, byte[] signature)
    Parameters
    Type Name Description
    Stream data
    byte[] signature
    Returns
    Type Description
    bool

    VerifyData(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

    Declaration
    public virtual bool VerifyData(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data
    ReadOnlySpan<byte> signature
    Returns
    Type Description
    bool

    VerifyDataCore(Stream, ReadOnlySpan<byte>)

    Verifies that a digital signature is valid for the provided data.

    Declaration
    protected virtual bool VerifyDataCore(Stream data, ReadOnlySpan<byte> signature)
    Parameters
    Type Name Description
    Stream data

    The signed data.

    ReadOnlySpan<byte> signature

    The signature to verify.

    Returns
    Type Description
    bool

    true if the digital signature is valid for the provided data; otherwise, false.

    Exceptions
    Type Condition
    CryptographicException

    An error occurred in the hashing or verification operation.

    VerifyDataCore(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

    Verifies that a digital signature is valid for the provided data.

    Declaration
    protected virtual bool VerifyDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> data

    The signed data.

    ReadOnlySpan<byte> signature

    The signature to verify.

    Returns
    Type Description
    bool

    true if the digital signature is valid for the provided data; otherwise, false.

    Exceptions
    Type Condition
    CryptographicException

    An error occurred in the hashing or verification operation.

    VerifyHash(byte[], byte[])

    Declaration
    public virtual bool VerifyHash(byte[] hash, byte[] signature)
    Parameters
    Type Name Description
    byte[] hash
    byte[] signature
    Returns
    Type Description
    bool

    VerifyHash(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

    Declaration
    public virtual bool VerifyHash(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash
    ReadOnlySpan<byte> signature
    Returns
    Type Description
    bool

    VerifyHashCore(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

    Verifies that a digital signature is valid for the provided hash.

    Declaration
    protected abstract bool VerifyHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> hash

    The signed hash.

    ReadOnlySpan<byte> signature

    The signature to verify.

    Returns
    Type Description
    bool

    true if the digital signature is valid for the provided data; otherwise, false.

    Exceptions
    Type Condition
    CryptographicException

    An error occurred in the verification operation.

    Implements

    IDisposable
    В этом разделе
    Наверх Generated by DocFX