List of usage examples for org.bouncycastle.crypto.digests RIPEMD160Digest reset
public void reset()
From source file:xyz.jamescarroll.genipass.Crypto.ECKey.java
License:Open Source License
/** * Public method that generates the master extended public key. * * @param u the string of the username// ww w . ja v a2 s .c o m * @param p the string of the master password. * @return an ECKey object representing the master extended public key. */ public static ECKey genFromSeeds(String u, String p) { RIPEMD160Digest ripemd = new RIPEMD160Digest(); byte[] digest = new byte[ripemd.getDigestSize()]; BigInteger hu, hp; hu = ripemd160ToBigInteger(u.getBytes(), digest, ripemd); hp = ripemd160ToBigInteger(p.getBytes(), digest, ripemd); ripemd.reset(); digest = calcMasterExtPrivateKey(hu, hp); return calcExtPublicKey(digest).setmMaster(true); }