Add SHA3 hashing

- added these variants: SHA3-256, SHA3-384, SHA3-512
- reordered also the hashing id's
- added some notes about them in DOC/Hashes.txt

Signed-off-by: Tino Reichardt <milky-7zip@mcmilk.de>
This commit is contained in:
Tino Reichardt
2023-06-18 09:13:59 +02:00
parent 9b8a493437
commit dddf507557
25 changed files with 496 additions and 35 deletions

View File

@@ -1,5 +1,7 @@
/*
* Taken from lib/crypto/* of samba-4.5.8.tar.gz.
*
* Copyright (c) 2006, 2010 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
@@ -32,8 +34,7 @@
* SUCH DAMAGE.
*/
#include "hash.h"
#include "sha.h"
#include "sha512.h"
#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))