Examples of RC2CBCParameter


Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

                return;
            }
            else if (format.equals("ASN.1"))
            {
                ASN1InputStream         aIn = new ASN1InputStream(params);
                RC2CBCParameter         p = RC2CBCParameter.getInstance(aIn.readObject());

                if (p.getRC2ParameterVersion() != null)
                {
                    parameterVersion = p.getRC2ParameterVersion().intValue();
                }

                iv = p.getIV();

                return;
            }

            throw new IOException("Unknown parameters format in IV parameters object");
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

        CipherParameters cipherParams = extractPBES2CipherParams(password, pbeParams);

        EncryptionScheme scheme = pbeParams.getEncryptionScheme();
        BufferedBlockCipher cipher;
        if (scheme.getAlgorithm().equals(PKCSObjectIdentifiers.RC2_CBC)) {
            RC2CBCParameter rc2Params = new RC2CBCParameter((ASN1Sequence) scheme.getObject());
            byte[] iv = rc2Params.getIV();
            CipherParameters param = new ParametersWithIV(cipherParams, iv);
            cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new RC2Engine()));
            cipher.init(false, param);
        } else {
            byte[] iv = ((ASN1OctetString) scheme.getObject()).getOctets();
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

        {
            if (isASN1FormatString(format))
            {
                if (parameterVersion == -1)
                {
                    return new RC2CBCParameter(engineGetEncoded()).getEncoded();
                }
                else
                {
                    return new RC2CBCParameter(parameterVersion, engineGetEncoded()).getEncoded();
                }
            }

            if (format.equals("RAW"))
            {
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

            String format)
            throws IOException
        {
            if (isASN1FormatString(format))
            {
                RC2CBCParameter p = RC2CBCParameter.getInstance(ASN1Object.fromByteArray(params));

                if (p.getRC2ParameterVersion() != null)
                {
                    parameterVersion = p.getRC2ParameterVersion().intValue();
                }

                iv = p.getIV();

                return;
            }

            if (format.equals("RAW"))
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

        {
            if (isASN1FormatString(format))
            {
                if (parameterVersion == -1)
                {
                    return new RC2CBCParameter(engineGetEncoded()).getEncoded();
                }
                else
                {
                    return new RC2CBCParameter(parameterVersion, engineGetEncoded()).getEncoded();
                }
            }

            if (format.equals("RAW"))
            {
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

            throws IOException
        {
            if (isASN1FormatString(format))
            {
                ASN1InputStream         aIn = new ASN1InputStream(params);
                RC2CBCParameter         p = RC2CBCParameter.getInstance(aIn.readObject());

                if (p.getRC2ParameterVersion() != null)
                {
                    parameterVersion = p.getRC2ParameterVersion().intValue();
                }

                iv = p.getIV();

                return;
            }

            if (format.equals("RAW"))
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

        {
            if (isASN1FormatString(format))
            {
                if (parameterVersion == -1)
                {
                    return new RC2CBCParameter(engineGetEncoded()).getEncoded();
                }
                else
                {
                    return new RC2CBCParameter(parameterVersion, engineGetEncoded()).getEncoded();
                }
            }

            if (format.equals("RAW"))
            {
View Full Code Here

Examples of org.bouncycastle.asn1.pkcs.RC2CBCParameter

            throws IOException
        {
            if (isASN1FormatString(format))
            {
                ASN1InputStream         aIn = new ASN1InputStream(params);
                RC2CBCParameter         p = RC2CBCParameter.getInstance(aIn.readObject());

                if (p.getRC2ParameterVersion() != null)
                {
                    parameterVersion = p.getRC2ParameterVersion().intValue();
                }

                iv = p.getIV();

                return;
            }

            if (format.equals("RAW"))
View Full Code Here

Examples of org.bouncycastle2.asn1.pkcs.RC2CBCParameter

        {
            if (isASN1FormatString(format))
            {
                if (parameterVersion == -1)
                {
                    return new RC2CBCParameter(engineGetEncoded()).getEncoded();
                }
                else
                {
                    return new RC2CBCParameter(parameterVersion, engineGetEncoded()).getEncoded();
                }
            }

            if (format.equals("RAW"))
            {
View Full Code Here

Examples of org.bouncycastle2.asn1.pkcs.RC2CBCParameter

            String format)
            throws IOException
        {
            if (isASN1FormatString(format))
            {
                RC2CBCParameter p = RC2CBCParameter.getInstance(ASN1Object.fromByteArray(params));

                if (p.getRC2ParameterVersion() != null)
                {
                    parameterVersion = p.getRC2ParameterVersion().intValue();
                }

                iv = p.getIV();

                return;
            }

            if (format.equals("RAW"))
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.