Struct CpHashAlgorithmName
Specifies the name of a cryptographic hash algorithm.
Assembly: CryptoPro.Security.Cryptography.dll
Syntax
public readonly struct CpHashAlgorithmName : IEquatable<CpHashAlgorithmName>
Constructors
CpHashAlgorithmName(string)
Declaration
public CpHashAlgorithmName(string name)
Parameters
Type |
Name |
Description |
string |
name |
The custom hash algorithm name.
|
Properties
GOST3411
Declaration
public static CpHashAlgorithmName GOST3411 { get; }
Property Value
GOST3411_2012_256
Declaration
public static CpHashAlgorithmName GOST3411_2012_256 { get; }
Property Value
GOST3411_2012_512
Declaration
public static CpHashAlgorithmName GOST3411_2012_512 { get; }
Property Value
MD5
Declaration
public static CpHashAlgorithmName MD5 { get; }
Property Value
Name
Gets the underlying string representation of the algorithm name.
Declaration
public string Name { get; }
Property Value
SHA1
Declaration
public static CpHashAlgorithmName SHA1 { get; }
Property Value
SHA256
Declaration
public static CpHashAlgorithmName SHA256 { get; }
Property Value
SHA384
Declaration
public static CpHashAlgorithmName SHA384 { get; }
Property Value
SHA3_256
Declaration
public static CpHashAlgorithmName SHA3_256 { get; }
Property Value
SHA3_384
Declaration
public static CpHashAlgorithmName SHA3_384 { get; }
Property Value
SHA3_512
Declaration
public static CpHashAlgorithmName SHA3_512 { get; }
Property Value
SHA512
Declaration
public static CpHashAlgorithmName SHA512 { get; }
Property Value
Methods
Equals(CpHashAlgorithmName)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CpHashAlgorithmName other)
Parameters
Returns
Type |
Description |
bool |
true if the current object is equal to the other parameter; otherwise, false.
|
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
The object to compare with the current instance.
|
Returns
Type |
Description |
bool |
true if obj and this instance are the same type and represent the same value; otherwise, false.
|
Overrides
Equals(HashAlgorithmName)
Declaration
public bool Equals(HashAlgorithmName other)
Parameters
Returns
FromOid(string)
Converts the specified OID to a hash algorithm name.
Declaration
public static CpHashAlgorithmName FromOid(string oidValue)
Parameters
Type |
Name |
Description |
string |
oidValue |
The OID of the hash algorithm.
|
Returns
Exceptions
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
int |
A 32-bit signed integer that is the hash code for this instance.
|
Overrides
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type |
Description |
string |
The fully qualified type name.
|
Overrides
TryFromOid(string, out CpHashAlgorithmName)
Tries to convert the specified OID to a hash algorithm name.
Declaration
public static bool TryFromOid(string oidValue, out CpHashAlgorithmName value)
Parameters
Type |
Name |
Description |
string |
oidValue |
The OID of the hash algorithm.
|
CpHashAlgorithmName |
value |
When this method returns true , the hash algorithm. When this
method returns false , contains default .
|
Returns
Type |
Description |
bool |
true if the OID was successfully mapped to a hash
algorithm; otherwise false .
|
Exceptions
Operators
operator ==(CpHashAlgorithmName, CpHashAlgorithmName)
Declaration
public static bool operator ==(CpHashAlgorithmName left, CpHashAlgorithmName right)
Parameters
Returns
operator ==(CpHashAlgorithmName, HashAlgorithmName)
Declaration
public static bool operator ==(CpHashAlgorithmName left, HashAlgorithmName right)
Parameters
Returns
operator ==(HashAlgorithmName, CpHashAlgorithmName)
Declaration
public static bool operator ==(HashAlgorithmName left, CpHashAlgorithmName right)
Parameters
Returns
explicit operator CpHashAlgorithmName(HashAlgorithmName)
Declaration
public static explicit operator CpHashAlgorithmName(HashAlgorithmName han)
Parameters
Returns
implicit operator HashAlgorithmName(CpHashAlgorithmName)
Declaration
public static implicit operator HashAlgorithmName(CpHashAlgorithmName cphan)
Parameters
Returns
operator !=(CpHashAlgorithmName, CpHashAlgorithmName)
Declaration
public static bool operator !=(CpHashAlgorithmName left, CpHashAlgorithmName right)
Parameters
Returns
operator !=(CpHashAlgorithmName, HashAlgorithmName)
Declaration
public static bool operator !=(CpHashAlgorithmName left, HashAlgorithmName right)
Parameters
Returns
operator !=(HashAlgorithmName, CpHashAlgorithmName)
Declaration
public static bool operator !=(HashAlgorithmName left, CpHashAlgorithmName right)
Parameters
Returns
Implements