Examples of RC4Engine


Examples of com.maverick.crypto.engines.RC4Engine

    public SSL_RSA_WITH_RC4_128_MD5() {
    }

    public void init(byte[] encryptKey, byte[] encryptIV, byte[] decryptKey, byte[] decryptIV) {

        encrypt = new RC4Engine();
        encrypt.init(true, encryptKey);

        decrypt = new RC4Engine();
        decrypt.init(false, decryptKey);
    }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

 
  protected byte[]
  getObfuscatedValue(
    byte[]    plain_key )
  {
        RC4Engine  engine = new RC4Engine();
       
    CipherParameters  params = new KeyParameter( new SHA1Simple().calculateHash( plain_key ));
   
    engine.init( true, params );

    byte[]  temp = new byte[1024];
   
    engine.processBytes( temp, 0, 1024, temp, 0 );
   
    final byte[] obs_value = new byte[ plain_key.length ];
   
    engine.processBytes( plain_key, 0, plain_key.length, obs_value, 0 );
   
    return( obs_value );
  }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

           
          byte[]  d_key = hasher.getDigest();
           
            // for RC4 enc/dec is irrelevant
         
          RC4Engine rc4_engine_a  = getCipher( a_key )
          RC4Engine rc4_engine_b  = getCipher( b_key );
          RC4Engine rc4_engine_c  = getCipher( c_key )
          RC4Engine rc4_engine_d  = getCipher( d_key )
         
         
          if ( lead_connection.isIncoming()){
           
            header_cipher_out  = rc4_engine_a;
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

  getCipher(
    byte[]      key )
  {
      SecretKeySpec  secret_key_spec = new SecretKeySpec( key, "RC4" );
     
      RC4Engine rc4_engine  = new RC4Engine();
   
    CipherParameters  params_a = new KeyParameter( secret_key_spec.getEncoded());
   
      // for RC4 enc/dec is irrelevant
   
    rc4_engine.init( true, params_a );
   
      // skip first 1024 bytes of stream to protected against a Fluhrer, Mantin and Shamir attack
     
      byte[]  temp = new byte[1024];
 
      rc4_engine.processBytes( temp, 0, temp.length, temp, 0 );
     
      return( rc4_engine );
  }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

          }
        }
       
        if ( internal_rc4 ){
                 
          rc4_engine  = new RC4Engine();
         
          CipherParameters  params = new KeyParameter(key_spec.getEncoded());
         
          rc4_engine.init( mode == Cipher.ENCRYPT_MODE, params );
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

    public static class Base
        extends BaseStreamCipher
    {
        public Base()
        {
            super(new RC4Engine(), 0);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

    static public class PBEWithSHAAnd128Bit
        extends BaseStreamCipher
    {
        public PBEWithSHAAnd128Bit()
        {
            super(new RC4Engine(), 0);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

    static public class PBEWithSHAAnd40Bit
        extends BaseStreamCipher
    {
        public PBEWithSHAAnd40Bit()
        {
            super(new RC4Engine(), 0);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

            createHMACDigest(macAlgorithm), createHMACDigest(macAlgorithm), 16);
    }

    protected StreamCipher createRC4StreamCipher()
    {
        return new RC4Engine();
    }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.RC4Engine

    static public class RC4
        extends JCEStreamCipher
    {
        public RC4()
        {
            super(new RC4Engine(), 0);
        }
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.