Search in sources :

Example 1 with CSHAKEDigest

use of com.github.zhenwei.core.crypto.digests.CSHAKEDigest in project LinLong-Java by zhenwei1108.

the class HashUtils method customizableSecureHashAlgorithmKECCAK256Simple.

static void customizableSecureHashAlgorithmKECCAK256Simple(byte[] output, int outputOffset, int outputLength, short continuousTimeStochasticModelling, byte[] input, int inputOffset, int inputLength) {
    CSHAKEDigest dig = new CSHAKEDigest(256, null, new byte[] { (byte) continuousTimeStochasticModelling, (byte) (continuousTimeStochasticModelling >> 8) });
    dig.update(input, inputOffset, inputLength);
    dig.doFinal(output, outputOffset, outputLength);
}
Also used : CSHAKEDigest(com.github.zhenwei.core.crypto.digests.CSHAKEDigest)

Example 2 with CSHAKEDigest

use of com.github.zhenwei.core.crypto.digests.CSHAKEDigest in project LinLong-Java by zhenwei1108.

the class HashUtils method customizableSecureHashAlgorithmKECCAK128Simple.

/* Customizable Secure Hash Algorithm KECCAK 128 / Customizable Secure Hash Algorithm KECCAK 256 */
static void customizableSecureHashAlgorithmKECCAK128Simple(byte[] output, int outputOffset, int outputLength, short continuousTimeStochasticModelling, byte[] input, int inputOffset, int inputLength) {
    CSHAKEDigest dig = new CSHAKEDigest(128, null, new byte[] { (byte) continuousTimeStochasticModelling, (byte) (continuousTimeStochasticModelling >> 8) });
    dig.update(input, inputOffset, inputLength);
    dig.doFinal(output, outputOffset, outputLength);
}
Also used : CSHAKEDigest(com.github.zhenwei.core.crypto.digests.CSHAKEDigest)

Aggregations

CSHAKEDigest (com.github.zhenwei.core.crypto.digests.CSHAKEDigest)2