Examples of TwofishEngine


Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class Twofish_OFB8
        extends JCEStreamCipher
    {
        public Twofish_OFB8()
        {
            super(new OFBBlockCipher(new TwofishEngine(), 8), 128);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class Twofish
        extends JCEBlockCipher
    {
        public Twofish()
        {
            super(new TwofishEngine());
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class PBEWithSHAAndTwofish
        extends JCEBlockCipher
    {
        public PBEWithSHAAndTwofish()
        {
            super(new CBCBlockCipher(new TwofishEngine()));
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

            break;
        case SymmetricKeyAlgorithmTags.DES:
            engine = new DESEngine();
            break;
        case SymmetricKeyAlgorithmTags.TWOFISH:
            engine = new TwofishEngine();
            break;
        case SymmetricKeyAlgorithmTags.TRIPLE_DES:
            engine = new DESedeEngine();
            break;
        default:
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class Twofish
        extends JCEBlockCipher
    {
        public Twofish()
        {
            super(new TwofishEngine());
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class PBEWithSHAAndTwofish
        extends JCEBlockCipher
    {
        public PBEWithSHAAndTwofish()
        {
            super(new CBCBlockCipher(new TwofishEngine()));
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class Twofish_CFB8
        extends JCEStreamCipher
    {
        public Twofish_CFB8()
        {
            super(new CFBBlockCipher(new TwofishEngine(), 8), 128);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    static public class Twofish_OFB8
        extends JCEStreamCipher
    {
        public Twofish_OFB8()
        {
            super(new OFBBlockCipher(new TwofishEngine(), 8), 128);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    super(id, algorithm, keySize, ivSize, needsUnlimitedStrength);
  }
   
  @Override
  public OutputStream newCipherOutputStream(OutputStream underlyingOutputStream, byte[] secretKey, byte[] iv) throws CipherException {
    AEADBlockCipher cipher = new GCMBlockCipher(new TwofishEngine());
    cipher.init(true, new AEADParameters(new KeyParameter(secretKey), MAC_SIZE, iv));
   
    return new org.bouncycastle.crypto.io.CipherOutputStream(underlyingOutputStream, cipher);
  }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.TwofishEngine

    return new org.bouncycastle.crypto.io.CipherOutputStream(underlyingOutputStream, cipher);
  }

  @Override
  public InputStream newCipherInputStream(InputStream underlyingInputStream, byte[] secretKey, byte[] iv) throws CipherException {
    AEADBlockCipher cipher = new GCMBlockCipher(new TwofishEngine());
    cipher.init(false, new AEADParameters(new KeyParameter(secretKey), MAC_SIZE, iv));
   
    return new org.bouncycastle.crypto.io.CipherInputStream(underlyingInputStream, cipher);
  }
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.