Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
hash /
sha3 /
generic32lc /
Delete
Unzip
Name
Size
Permission
Date
Action
KeccakHash.c
3.19
KB
-rw-rw-r--
2022-10-31 11:36
KeccakHash.h
5.26
KB
-rw-rw-r--
2022-10-31 11:36
KeccakP-1600-SnP.h
1.68
KB
-rw-rw-r--
2022-10-31 11:36
KeccakP-1600-inplace32BI.c
41.47
KB
-rw-rw-r--
2022-10-31 11:36
KeccakSponge.c
2.98
KB
-rw-rw-r--
2022-10-31 11:36
KeccakSponge.h
9.02
KB
-rw-rw-r--
2022-10-31 11:36
KeccakSponge.inc
10.99
KB
-rw-rw-r--
2022-10-31 11:36
SnP-Relaned.h
5.82
KB
-rw-rw-r--
2022-10-31 11:36
align.h
939
B
-rw-rw-r--
2022-10-31 11:36
brg_endian.h
5.42
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
/* Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, Joan Daemen, Michaƫl Peeters, Gilles Van Assche and Ronny Van Keer, hereby denoted as "the implementer". For more information, feedback or questions, please refer to our websites: http://keccak.noekeon.org/ http://keyak.noekeon.org/ http://ketje.noekeon.org/ To the extent possible under law, the implementer has waived all copyright and related or neighboring rights to the source code in this file. http://creativecommons.org/publicdomain/zero/1.0/ */ #include <string.h> #include "KeccakHash.h" /* ---------------------------------------------------------------- */ HashReturn Keccak_HashInitialize(Keccak_HashInstance *instance, unsigned int rate, unsigned int capacity, unsigned int hashbitlen, unsigned char delimitedSuffix) { HashReturn result; if (delimitedSuffix == 0) return FAIL; result = (HashReturn)KeccakWidth1600_SpongeInitialize(&instance->sponge, rate, capacity); if (result != SUCCESS) return result; instance->fixedOutputLength = hashbitlen; instance->delimitedSuffix = delimitedSuffix; return SUCCESS; } /* ---------------------------------------------------------------- */ HashReturn Keccak_HashUpdate(Keccak_HashInstance *instance, const BitSequence *data, DataLength databitlen) { if ((databitlen % 8) == 0) return (HashReturn)KeccakWidth1600_SpongeAbsorb(&instance->sponge, data, databitlen/8); else { HashReturn ret = (HashReturn)KeccakWidth1600_SpongeAbsorb(&instance->sponge, data, databitlen/8); if (ret == SUCCESS) { /* The last partial byte is assumed to be aligned on the least significant bits */ unsigned char lastByte = data[databitlen/8]; /* Concatenate the last few bits provided here with those of the suffix */ unsigned short delimitedLastBytes = (unsigned short)((unsigned short)lastByte | ((unsigned short)instance->delimitedSuffix << (databitlen % 8))); if ((delimitedLastBytes & 0xFF00) == 0x0000) { instance->delimitedSuffix = delimitedLastBytes & 0xFF; } else { unsigned char oneByte[1]; oneByte[0] = delimitedLastBytes & 0xFF; ret = (HashReturn)KeccakWidth1600_SpongeAbsorb(&instance->sponge, oneByte, 1); instance->delimitedSuffix = (delimitedLastBytes >> 8) & 0xFF; } } return ret; } } /* ---------------------------------------------------------------- */ HashReturn Keccak_HashFinal(Keccak_HashInstance *instance, BitSequence *hashval) { HashReturn ret = (HashReturn)KeccakWidth1600_SpongeAbsorbLastFewBits(&instance->sponge, instance->delimitedSuffix); if (ret == SUCCESS) return (HashReturn)KeccakWidth1600_SpongeSqueeze(&instance->sponge, hashval, instance->fixedOutputLength/8); else return ret; } /* ---------------------------------------------------------------- */ HashReturn Keccak_HashSqueeze(Keccak_HashInstance *instance, BitSequence *data, DataLength databitlen) { if ((databitlen % 8) != 0) return FAIL; return (HashReturn)KeccakWidth1600_SpongeSqueeze(&instance->sponge, data, databitlen/8); }