summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/sha3/KeccakNISTInterface.h
diff options
context:
space:
mode:
authorRichard Moore <rich@kde.org>2013-02-03 11:33:26 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-09 15:58:09 +0100
commit20bde28448583eecb1e37b9492eb4dc73b1409fe (patch)
tree27a086a50f7b2f5ab1fcb2f366e3114921dc1dd3 /src/3rdparty/sha3/KeccakNISTInterface.h
parentd1acaf2b1c60f276dfbe4ed33eb3b6800d99fcbb (diff)
Add support for SHA3 to QCryptographicHash.
This commit adds SHA3 support to QCryptographicHash. Two implementations are provided, one optimised for 32 bit and one for 64 bits. The code has been written to make it easy to add further implementations, for example ones using NEON instructions on ARM. Change-Id: I3be9c45bbd4fcc2771d697e7f7ae74e48a831e8f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/sha3/KeccakNISTInterface.h')
-rwxr-xr-xsrc/3rdparty/sha3/KeccakNISTInterface.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/3rdparty/sha3/KeccakNISTInterface.h b/src/3rdparty/sha3/KeccakNISTInterface.h
index c6987d420b..cd85f24aa7 100755
--- a/src/3rdparty/sha3/KeccakNISTInterface.h
+++ b/src/3rdparty/sha3/KeccakNISTInterface.h
@@ -32,7 +32,7 @@ typedef spongeState hashState;
* @pre The value of hashbitlen must be one of 0, 224, 256, 384 and 512.
* @return SUCCESS if successful, BAD_HASHLEN if the value of hashbitlen is incorrect.
*/
-HashReturn Init(hashState *state, int hashbitlen);
+static HashReturn Init(hashState *state, int hashbitlen);
/**
* Function to give input data for the sponge function to absorb.
* @param state Pointer to the state of the sponge function initialized by Init().
@@ -43,7 +43,7 @@ HashReturn Init(hashState *state, int hashbitlen);
* @pre In the previous call to Absorb(), databitLen was a multiple of 8.
* @return SUCCESS if successful, FAIL otherwise.
*/
-HashReturn Update(hashState *state, const BitSequence *data, DataLength databitlen);
+static HashReturn Update(hashState *state, const BitSequence *data, DataLength databitlen);
/**
* Function to squeeze output data from the sponge function.
* If @a hashbitlen was not 0 in the call to Init(), the number of output bits is equal to @a hashbitlen.
@@ -52,7 +52,7 @@ HashReturn Update(hashState *state, const BitSequence *data, DataLength databitl
* @param hashval Pointer to the buffer where to store the output data.
* @return SUCCESS if successful, FAIL otherwise.
*/
-HashReturn Final(hashState *state, BitSequence *hashval);
+static HashReturn Final(hashState *state, BitSequence *hashval);
/**
* Function to compute a hash using the Keccak[r, c] sponge function.
* The rate r and capacity c values are determined from @a hashbitlen.
@@ -65,6 +65,6 @@ HashReturn Final(hashState *state, BitSequence *hashval);
* @pre The value of hashbitlen must be one of 224, 256, 384 and 512.
* @return SUCCESS if successful, BAD_HASHLEN if the value of hashbitlen is incorrect.
*/
-HashReturn Hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval);
+static HashReturn Hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval);
#endif