Top Description Fields Constructors Methods
org.bouncycastle.crypto.digests

public Class Haraka256Digest

extends HarakaBase
Class Inheritance
Imports
org.bouncycastle.crypto.CryptoServicePurpose, .CryptoServicesRegistrar, org.bouncycastle.util.Arrays, .Bytes

Haraka-256 v2, https://eprint.iacr.org/2016/098.pdf

Haraka256-256 with reference to Python Reference Impl from: https://github.com/kste/haraka

Field Summary

Modifier and TypeField and Description
private final byte[]
private int
private final CryptoServicePurpose
Inherited from org.bouncycastle.crypto.digests.HarakaBase:
DIGEST_SIZERC

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public int
doFinal(byte[]
the array the digest is to be copied into.
out
,
int
the offset into the out array the digest is to start at.
outOff
)

Implements org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value.
public String
private int
haraka256256(byte[] msg, byte[] out, int outOff)

private void
mix256(byte[][] s1, byte[][] s2)

public void
reset()

Implements org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.
public void
update(byte
the input byte to be entered.
in
)

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a single byte.
public void
update(byte[]
the byte array containing the data.
in
,
int
the offset into the byte array where the data starts.
inOff
,
int
the length of the data.
len
)

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.
Inherited from org.bouncycastle.crypto.digests.HarakaBase:
aesEncgetDigestSizemulXsBoxshiftRowssubBytes

Field Detail

bufferback to summary
private final byte[] buffer
offback to summary
private int off
purposeback to summary
private final CryptoServicePurpose purpose

Constructor Detail

Haraka256Digestback to summary
public Haraka256Digest()
Haraka256Digestback to summary
public Haraka256Digest(CryptoServicePurpose purpose)
Haraka256Digestback to summary
public Haraka256Digest(Haraka256Digest digest)

Method Detail

doFinalback to summary
public int doFinal(byte[] out, int outOff)

Implements org.bouncycastle.crypto.Digest.doFinal.

Doc from org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value. The doFinal call leaves the digest reset.

Parameters
out:byte[]

the array the digest is to be copied into.

outOff:int

the offset into the out array the digest is to start at.

getAlgorithmNameback to summary
public String getAlgorithmName()

Implements org.bouncycastle.crypto.Digest.getAlgorithmName.

Doc from org.bouncycastle.crypto.Digest.getAlgorithmName.

return the algorithm name

Returns:String

the algorithm name

haraka256256back to summary
private int haraka256256(byte[] msg, byte[] out, int outOff)
mix256back to summary
private void mix256(byte[][] s1, byte[][] s2)
resetback to summary
public void reset()

Implements org.bouncycastle.crypto.Digest.reset.

Doc from org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.

updateback to summary
public void update(byte in)

Implements org.bouncycastle.crypto.Digest.update.

Doc from org.bouncycastle.crypto.Digest.update.

update the message digest with a single byte.

Parameters
in:byte

the input byte to be entered.

updateback to summary
public void update(byte[] in, int inOff, int len)

Implements org.bouncycastle.crypto.Digest.update.

Doc from org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.

Parameters
in:byte[]

the byte array containing the data.

inOff:int

the offset into the byte array where the data starts.

len:int

the length of the data.