public void reset() { initKey(this.workingKey, this.workingIV); g = x1 = x2 = x3 = x4 = n = 0; T = new byte[32]; for (int i = 0; i < 32; i++) { T[i] = 0; } }
@Override public byte[] getSignature() { byte[] signature = new byte[outLen]; hmac.doFinal(signature, 0); return signature; }
/** * Base constructor for one of the standard digest algorithms that the * byteLength of the algorithm is know for. * * @param digest the digest. */ public HMac( Digest digest) { this(digest, getByteLength(digest)); }
@Override public OutputStream getOutputStream() { hmac.reset(); return outputStream; }
private static byte[] doubleLu(byte[] in) { byte[] ret = new byte[in.length]; int carry = shiftLeft(in, ret); int xor = 0xff & (in.length == 16 ? CONSTANT_128 : CONSTANT_64); /* * NOTE: This construction is an attempt at a constant-time implementation. */ ret[in.length - 1] ^= (xor >>> ((1 - carry) << 3)); return ret; }
public void update(byte input) throws IllegalStateException { m >>>= 8; m |= (input & 0xffL) << 56; if (++wordPos == 8) { processMessageWord(); wordPos = 0; } }
protected void processMessageWord() { ++wordCount; v3 ^= m; applySipRounds(c); v0 ^= m; }
public Mac() { super(new GOST28147Mac()); } }
public void update(byte in) { if (bufOff == buf.length) { processBlock(buf, 0); bufOff = 0; } buf[bufOff++] = in; }
public SkeinMac_256_224() { super(new SkeinMac(SkeinMac.SKEIN_256, 224)); } }
public HashMac384() { super(new DSTU7564Mac(384)); } }
public Mac24() { super(new org.bouncycastle.crypto.macs.SipHash()); } }
public void reset() { initKey(this.workingKey, this.workingIV); g = x1 = x2 = x3 = x4 = n = 0; T = new byte[32]; for (int i = 0; i < 32; i++) { T[i] = 0; } }
@Override public OutputStream getOutputStream() { hmac.reset(); return outputStream; }
public SkeinMac_256_256() { super(new SkeinMac(SkeinMac.SKEIN_256, 256)); } }
public HashMac512() { super(new DSTU7564Mac(512)); } }
public SkeinMac_1024_384() { super(new SkeinMac(SkeinMac.SKEIN_1024, 384)); } }