ADD: Feature [0001960] Add BLAKE2b, BLAKE2bp hash sum algorithms

This commit is contained in:
Alexander Koblov 2018-06-10 12:33:43 +00:00
commit ee8826a2b4

View file

@ -4,7 +4,7 @@
General Hash Unit: This unit defines the common types, functions,
and procedures
Copyright (C) 2009-2017 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2009-2018 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -32,23 +32,23 @@ uses
type
THashContext = TDCP_hash;
THashAlgorithm = (HASH_BLAKE2S, HASH_BLAKE2SP, HASH_BLAKE2B, HASH_CRC32, HASH_HAVAL,
HASH_MD4, HASH_MD5, HASH_RIPEMD128, HASH_RIPEMD160, HASH_SFV,
THashAlgorithm = (HASH_BLAKE2S, HASH_BLAKE2SP, HASH_BLAKE2B, HASH_BLAKE2BP, HASH_CRC32,
HASH_HAVAL, HASH_MD4, HASH_MD5, HASH_RIPEMD128, HASH_RIPEMD160, HASH_SFV,
HASH_SHA1, HASH_SHA224, HASH_SHA256, HASH_SHA384, HASH_SHA512,
HASH_SHA3_224, HASH_SHA3_256, HASH_SHA3_384, HASH_SHA3_512, HASH_TIGER
);
var
HashFileExt: array[THashAlgorithm] of String = (
'blake2s', 'blake2sp', 'blake2b', 'crc32', 'haval', 'md4', 'md5',
'ripemd128', 'ripemd160', 'sfv', 'sha', 'sha224', 'sha256',
'blake2s', 'blake2sp', 'blake2b', 'blake2bp', 'crc32', 'haval', 'md4',
'md5', 'ripemd128', 'ripemd160', 'sfv', 'sha', 'sha224', 'sha256',
'sha384', 'sha512', 'sha3', 'sha3', 'sha3', 'sha3', 'tiger'
);
var
HashName: array[THashAlgorithm] of String = (
'blake2s', 'blake2sp', 'blake2b', 'crc32', 'haval', 'md4', 'md5',
'ripemd128', 'ripemd160', 'sfv', 'sha1_160', 'sha2_224',
'blake2s', 'blake2sp', 'blake2b', 'blake2bp', 'crc32', 'haval', 'md4',
'md5', 'ripemd128', 'ripemd160', 'sfv', 'sha1_160', 'sha2_224',
'sha2_256', 'sha2_384', 'sha2_512', 'sha3_224', 'sha3_256',
'sha3_384', 'sha3_512', 'tiger'
);
@ -75,6 +75,7 @@ begin
HASH_BLAKE2S: Context:= TDCP_blake2s.Create(nil);
HASH_BLAKE2SP: Context:= TDCP_blake2sp.Create(nil);
HASH_BLAKE2B: Context:= TDCP_blake2b.Create(nil);
HASH_BLAKE2BP: Context:= TDCP_blake2bp.Create(nil);
HASH_CRC32: Context:= TDCP_crc32.Create(nil);
HASH_HAVAL: Context:= TDCP_haval.Create(nil);
HASH_MD4: Context:= TDCP_md4.Create(nil);