Package org.bouncycastle.bcpg

Examples of org.bouncycastle.bcpg.SymmetricKeyEncSessionPacket


        }

        public void encode(BCPGOutputStream pOut)
            throws IOException
        {
            SymmetricKeyEncSessionPacket pk = new SymmetricKeyEncSessionPacket(encAlgorithm, s2k, sessionInfo);

            pOut.writePacket(pk);
        }
View Full Code Here


    {
        byte[] key = getKey(encAlgorithm);

        if (sessionInfo == null)
        {
            return new SymmetricKeyEncSessionPacket(encAlgorithm, s2k, null);
        }

        //
        // the passed in session info has the an RSA/ElGamal checksum added to it, for PBE this is not included.
        //
        byte[] nSessionInfo = new byte[sessionInfo.length - 2];

        System.arraycopy(sessionInfo, 0, nSessionInfo, 0, nSessionInfo.length);

        return new SymmetricKeyEncSessionPacket(encAlgorithm, s2k, encryptSessionInfo(encAlgorithm, key, nSessionInfo));
    }
View Full Code Here

        }

        public void encode(BCPGOutputStream pOut)
            throws IOException
        {
            SymmetricKeyEncSessionPacket pk = new SymmetricKeyEncSessionPacket(encAlgorithm, s2k, sessionInfo);

            pOut.writePacket(pk);
        }
View Full Code Here

TOP

Related Classes of org.bouncycastle.bcpg.SymmetricKeyEncSessionPacket

Copyright © 2018 www.massapicom. 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.