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