Examples of DigestOutputStream


Examples of org.bouncycastle.crypto.io.DigestOutputStream

            dOut.writeInt(iterationCount);
   
            cipher = this.makePBECipher(STORE_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount);
   
            CipherOutputStream  cOut = new CipherOutputStream(dOut, cipher);
            DigestOutputStream  dgOut = new DigestOutputStream(new SHA1Digest());
   
            this.saveStore(new TeeOutputStream(cOut, dgOut));
   
            byte[]  dig = dgOut.getDigest();

            cOut.write(dig);
   
            cOut.close();
        }
View Full Code Here

Examples of org.bouncycastle.crypto.io.DigestOutputStream

            dOut.writeInt(iterationCount);
   
            cipher = this.makePBECipher(STORE_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount);
   
            CipherOutputStream  cOut = new CipherOutputStream(dOut, cipher);
            DigestOutputStream  dgOut = new DigestOutputStream(cOut, new SHA1Digest());
   
            this.saveStore(dgOut);
   
            Digest  dig = dgOut.getDigest();
            byte[]  hash = new byte[dig.getDigestSize()];
   
            dig.doFinal(hash, 0);
   
            cOut.write(hash);
View Full Code Here

Examples of org.bouncycastle2.crypto.io.DigestOutputStream

            dOut.writeInt(iterationCount);
   
            cipher = this.makePBECipher(STORE_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount);
   
            CipherOutputStream  cOut = new CipherOutputStream(dOut, cipher);
            DigestOutputStream  dgOut = new DigestOutputStream(cOut, new SHA1Digest());
   
            this.saveStore(dgOut);
   
            Digest  dig = dgOut.getDigest();
            byte[]  hash = new byte[dig.getDigestSize()];
   
            dig.doFinal(hash, 0);
   
            cOut.write(hash);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.