Examples of PKCS1Encoding


Examples of com.googlecode.gwt.crypto.bouncycastle.encodings.PKCS1Encoding

     * @param raw
     * @return
     * @throws InvalidCipherTextException
     */
    public static byte[] encrypt(RSAKeyParameters publicKey, String raw) throws InvalidCipherTextException {
        AsymmetricBlockCipher eng = new PKCS1Encoding(new RSAEngine());
        eng.init(true, publicKey);

        byte[] input = raw.getBytes();

        return eng.processBlock(input, 0, input.length);
    }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

    static public class SHA1WithRSAEncryption
        extends JDKDigestSignature
    {
        public SHA1WithRSAEncryption()
        {
            super("SHA1withRSA", id_SHA1, new SHA1Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

    static public class MD2WithRSAEncryption
        extends JDKDigestSignature
    {
        public MD2WithRSAEncryption()
        {
            super("MD2withRSA", md2, new MD2Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

    static public class MD5WithRSAEncryption
        extends JDKDigestSignature
    {
        public MD5WithRSAEncryption()
        {
            super("MD5withRSA", md5, new MD5Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

    static public class RIPEMD160WithRSAEncryption
        extends JDKDigestSignature
    {
        public RIPEMD160WithRSAEncryption()
        {
            super("RIPEMD160withRSA", TeleTrusTObjectIdentifiers.ripemd160, new RIPEMD160Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

  static public class RIPEMD128WithRSAEncryption
    extends JDKDigestSignature
  {
    public RIPEMD128WithRSAEncryption()
    {
      super("RIPEMD128withRSA", TeleTrusTObjectIdentifiers.ripemd128, new RIPEMD128Digest(), new PKCS1Encoding(new RSAEngine()));
    }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

  static public class RIPEMD256WithRSAEncryption
    extends JDKDigestSignature
  {
    public RIPEMD256WithRSAEncryption()
    {
      super("RIPEMD256withRSA", TeleTrusTObjectIdentifiers.ripemd256, new RIPEMD256Digest(), new PKCS1Encoding(new RSAEngine()));
    }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

       
          // fallback to the BC implementation for jdk1.4.2 as JCE RSA not available
       
        RSAEngine  eng = new RSAEngine();
       
        PKCS1Encoding  padded_eng = new PKCS1Encoding( eng );
       
              CipherParameters param = RSAUtil.generatePublicKeyParameter(public_key);
             
              param = new ParametersWithRandom(param, RandomUtils.SECURE_RANDOM);
             
              padded_eng.init( true, param );
       
        encryped_session_key = padded_eng.processBlock(secret_bytes, 0, secret_bytes.length);
      }

    }catch( Throwable e ){
     
      e.printStackTrace();
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

        {
            cipher = new RSABlindedEngine();
        }
        else if (pad.equals("PKCS1PADDING"))
        {
            cipher = new PKCS1Encoding(new RSABlindedEngine());
        }
        else if (pad.equals("ISO9796-1PADDING"))
        {
            cipher = new ISO9796d1Encoding(new RSABlindedEngine());
        }
View Full Code Here

Examples of org.bouncycastle.crypto.encodings.PKCS1Encoding

    static public class PKCS1v1_5Padding
        extends CipherSpi
    {
        public PKCS1v1_5Padding()
        {
            super(new PKCS1Encoding(new RSABlindedEngine()));
        }
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.