public Memoable copy() { return new TigerDigest(this); }
public int doFinal( byte[] out, int outOff) { finish(); unpackWord(a, out, outOff); unpackWord(b, out, outOff + 8); unpackWord(c, out, outOff + 16); reset(); return DIGEST_LENGTH; }
private void finish() { long bitLength = (byteCount << 3); update((byte)0x01); while (bOff != 0) { update((byte)0); } processLength(bitLength); processBlock(); }
roundABC(x[0], 5); roundBCA(x[1], 5); roundCAB(x[2], 5); roundABC(x[3], 5); roundBCA(x[4], 5); roundCAB(x[5], 5); roundABC(x[6], 5); roundBCA(x[7], 5); keySchedule(); roundCAB(x[0], 7); roundABC(x[1], 7); roundBCA(x[2], 7); roundCAB(x[3], 7); roundABC(x[4], 7); roundBCA(x[5], 7); roundCAB(x[6], 7); roundABC(x[7], 7); keySchedule(); roundBCA(x[0], 9); roundCAB(x[1], 9); roundABC(x[2], 9); roundBCA(x[3], 9); roundCAB(x[4], 9); roundABC(x[5], 9); roundBCA(x[6], 9);
update(in[inOff]); processWord(in, inOff); update(in[inOff]);
/** * Standard constructor */ public TigerDigest() { reset(); }
public void update( byte in) { buf[bOff++] = in; if (bOff == buf.length) { processWord(buf, 0); } byteCount++; }
private void processWord( byte[] b, int off) { x[xOff++] = ((long)(b[off + 7] & 0xff) << 56) | ((long)(b[off + 6] & 0xff) << 48) | ((long)(b[off + 5] & 0xff) << 40) | ((long)(b[off + 4] & 0xff) << 32) | ((long)(b[off + 3] & 0xff) << 24) | ((long)(b[off + 2] & 0xff) << 16) | ((long)(b[off + 1] & 0xff) << 8) | ((b[off + 0] & 0xff)); if (xOff == x.length) { processBlock(); } bOff = 0; }
roundABC(x[0], 5); roundBCA(x[1], 5); roundCAB(x[2], 5); roundABC(x[3], 5); roundBCA(x[4], 5); roundCAB(x[5], 5); roundABC(x[6], 5); roundBCA(x[7], 5); keySchedule(); roundCAB(x[0], 7); roundABC(x[1], 7); roundBCA(x[2], 7); roundCAB(x[3], 7); roundABC(x[4], 7); roundBCA(x[5], 7); roundCAB(x[6], 7); roundABC(x[7], 7); keySchedule(); roundBCA(x[0], 9); roundCAB(x[1], 9); roundABC(x[2], 9); roundBCA(x[3], 9); roundCAB(x[4], 9); roundABC(x[5], 9); roundBCA(x[6], 9);
update(in[inOff]); processWord(in, inOff); update(in[inOff]);
/** * Standard constructor */ public TigerDigest() { reset(); }
public void update( byte in) { buf[bOff++] = in; if (bOff == buf.length) { processWord(buf, 0); } byteCount++; }
private void processWord( byte[] b, int off) { x[xOff++] = ((long)(b[off + 7] & 0xff) << 56) | ((long)(b[off + 6] & 0xff) << 48) | ((long)(b[off + 5] & 0xff) << 40) | ((long)(b[off + 4] & 0xff) << 32) | ((long)(b[off + 3] & 0xff) << 24) | ((long)(b[off + 2] & 0xff) << 16) | ((long)(b[off + 1] & 0xff) << 8) | ((b[off + 0] & 0xff)); if (xOff == x.length) { processBlock(); } bOff = 0; }
public Digest() { super(new TigerDigest()); }
private void finish() { long bitLength = (byteCount << 3); update((byte)0x01); while (bOff != 0) { update((byte)0); } processLength(bitLength); processBlock(); }
public int doFinal( byte[] out, int outOff) { finish(); unpackWord(a, out, outOff); unpackWord(b, out, outOff + 8); unpackWord(c, out, outOff + 16); reset(); return DIGEST_LENGTH; }
/** * Copy constructor. This will copy the state of the provided * message digest. */ public TigerDigest(TigerDigest t) { this.reset(t); }
public Digest() { super(new TigerDigest()); }
public PBEWithHashMac() { super(new HMac(new TigerDigest()), PKCS12, TIGER, 192); } }
public HashMac() { super(new HMac(new TigerDigest())); } }