public Digest() { super(new MD2Digest()); }
/** * close the digest, producing the final digest value. The doFinal * call leaves the digest reset. * * @param out the array the digest is to be copied into. * @param outOff the offset into the out array the digest is to start at. */ public int doFinal(byte[] out, int outOff) { // add padding byte paddingByte = (byte)(M.length-mOff); for (int i=mOff;i<M.length;i++) { M[i] = paddingByte; } //do final check sum processCheckSum(M); // do final block process processBlock(M); processBlock(C); System.arraycopy(X,xOff,out,outOff,16); reset(); return DIGEST_LENGTH; } /**
public MD2Digest(MD2Digest t) { copyIn(t); }
/** * update the message digest with a single byte. * * @param in the input byte to be entered. */ public void update(byte in) { M[mOff++] = in; if (mOff == 16) { processCheckSum(M); processBlock(M); mOff = 0; } }
update(in[inOff]); inOff++; len--; processCheckSum(M); processBlock(M); len -= 16; inOff += 16; update(in[inOff]); inOff++; len--;
public MD2Digest() { reset(); } public MD2Digest(MD2Digest t)
update(in[inOff]); inOff++; len--; processCheckSum(M); processBlock(M); len -= 16; inOff += 16; update(in[inOff]); inOff++; len--;
/** * update the message digest with a single byte. * * @param in the input byte to be entered. */ public void update(byte in) { M[mOff++] = in; if (mOff == 16) { processCheckSum(M); processBlock(M); mOff = 0; } }
public MD2Digest() { reset(); }
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) { return new MD2Digest(); } });
/** * close the digest, producing the final digest value. The doFinal * call leaves the digest reset. * * @param out the array the digest is to be copied into. * @param outOff the offset into the out array the digest is to start at. */ public int doFinal(byte[] out, int outOff) { // add padding byte paddingByte = (byte)(M.length-mOff); for (int i=mOff;i<M.length;i++) { M[i] = paddingByte; } //do final check sum processCheckSum(M); // do final block process processBlock(M); processBlock(C); System.arraycopy(X,xOff,out,outOff,16); reset(); return DIGEST_LENGTH; } /**
public void reset(Memoable other) { MD2Digest d = (MD2Digest)other; copyIn(d); } }
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) { return new MD2Digest(); } });
public Digest() { super(new MD2Digest()); }
public Memoable copy() { return new MD2Digest(this); }
public MD2() { super(new HMac(new MD2Digest())); } }
public MD2() { super(new HMac(new MD2Digest())); } }
public HashMac() { super(new HMac(new MD2Digest())); } }
public HashMac() { super(new HMac(new MD2Digest())); } }
public Object clone() throws CloneNotSupportedException { Digest d = (Digest)super.clone(); d.digest = new MD2Digest((MD2Digest)digest); return d; } }