FAES/AES/CryptUtils.cs
/// <summary>
/// Converts a ChecksumType to a byte array.
/// </summary>
/// <param name="checksumHashType">Checksum Type</param>
/// <returns>Byte Array</returns>
Converts a ChecksumType to a byte array.
Converts a ChecksumType to a byte array .
public static byte[] ConvertChecksumTypeToBytes(Checksums.ChecksumType checksumHashType)
        {
            switch (checksumHashType)
            {
                case Checksums.ChecksumType.SHA1:
                    return BitConverter.GetBytes(1);
                case Checksums.ChecksumType.SHA256:
                    return BitConverter.GetBytes(2);
                case Checksums.ChecksumType.SHA512:
                    return BitConverter.GetBytes(3);
                case Checksums.ChecksumType.SHA384:
                    return BitConverter.GetBytes(4);
                default:
                    return BitConverter.GetBytes(0);
            }
        }
public static byte [ ] ConvertChecksumTypeToBytes ( Checksums . ChecksumType checksumHashType ) { switch ( checksumHashType ) { case Checksums . ChecksumType . SHA1 : return BitConverter . GetBytes ( 1 ) ; case Checksums . ChecksumType . SHA256 : return BitConverter . GetBytes ( 2 ) ; case Checksums . ChecksumType . SHA512 : return BitConverter . GetBytes ( 3 ) ; case Checksums . ChecksumType . SHA384 : return BitConverter . GetBytes ( 4 ) ; default : return BitConverter . GetBytes ( 0 ) ; } }
Converts a ChecksumType to a byte array.
Converts a ChecksumType to a byte array .
None
checksumHashType
Checksums.ChecksumType
None