Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.jcajce.provider.symmetric;
  
 
 public final class Serpent
 {
     private Serpent()
     {
     }
     
     public static class ECB
         extends BaseBlockCipher
     {
         public ECB()
         {
             super(new BlockCipherProvider()
             {
                 public BlockCipher get()
                 {
                     return new SerpentEngine();
                 }
             });
         }
     }
 
     public static class KeyGen
         extends BaseKeyGenerator
     {
         public KeyGen()
         {
             super("Serpent", 192, new CipherKeyGenerator());
         }
     }
 
     public static class SerpentGMAC
         extends BaseMac
     {
         public SerpentGMAC()
         {
             super(new GMac(new GCMBlockCipher(new SerpentEngine())));
         }
     }
 
     public static class Poly1305
         extends BaseMac
     {
         public Poly1305()
         {
             super(new org.bouncycastle.crypto.macs.Poly1305(new TwofishEngine()));
         }
     }
 
     public static class Poly1305KeyGen
         extends BaseKeyGenerator
     {
         public Poly1305KeyGen()
         {
             super("Poly1305-Serpent", 256, new Poly1305KeyGenerator());
         }
     }
 
     public static class AlgParams
         extends IvAlgorithmParameters
     {
         protected String engineToString()
         {
             return "Serpent IV";
         }
     }
 
     public static class Mappings
         extends SymmetricAlgorithmProvider
     {
         private static final String PREFIX = Serpent.class.getName();
 
         public Mappings()
         {
         }
 
         public void configure(ConfigurableProvider provider)
         {
 
             provider.addAlgorithm("Cipher.Serpent" + "$ECB");
             provider.addAlgorithm("KeyGenerator.Serpent" + "$KeyGen");
             provider.addAlgorithm("AlgorithmParameters.Serpent" + "$AlgParams");
 
             addGMacAlgorithm(provider"SERPENT" + "$SerpentGMAC" + "$KeyGen");
            addPoly1305Algorithm(provider"SERPENT" + "$Poly1305" + "$Poly1305KeyGen");
        }
    }
New to GrepCode? Check out our FAQ X