PageRenderTime 18ms queryTime 45ms sortTime 1ms getByIdsTime 60ms findMatchingLines 52ms

100+ results results for 'crypto.cip blowfish' (18 ms)

Not the results you expected?
shiro.adoc https://github.com/gnodet/camel.git | AsciiDoc | 306 lines
                    
135
                    
136|`cipherService` |`AES` |org.apache.shiro.crypto.CipherService |Shiro ships with AES & Blowfish based CipherServices. You may use one
                    
137these or pass in your own Cipher implementation
                    
                
CryptoUtil.java https://github.com/interdroid/interdroid-util.git | Java | 367 lines
                    
44import javax.crypto.BadPaddingException;
                    
45import javax.crypto.Cipher;
                    
46import javax.crypto.IllegalBlockSizeException;
                    
75	 */
                    
76	public static final String DEFAULT_CYPHER = "Blowfish";
                    
77	/**
                    
                
DESCoder.java https://bitbucket.org/beginnerjyh/es.git | Java | 132 lines
                    
2
                    
3import javax.crypto.Cipher;
                    
4import javax.crypto.SecretKey;
                    
12 * <pre>
                    
13 * 支持 DES、DESede(TripleDES,就是3DES)、AES、Blowfish、RC2、RC4(ARCFOUR)
                    
14 * DES                  key size must be equal to 56
                    
16 * AES                  key size must be equal to 128, 192 or 256,but 192 and 256 bits may not be available
                    
17 * Blowfish             key size must be multiple of 8, and can only range from 32 to 448 (inclusive)
                    
18 * RC2                  key size must be between 40 and 1024 bits
                    
34     * AES                  key size must be equal to 128, 192 or 256,but 192 and 256 bits may not be available
                    
35     * Blowfish             key size must be multiple of 8, and can only range from 32 to 448 (inclusive)
                    
36     * RC2                  key size must be between 40 and 1024 bits
                    
                
JCEStreamCipher.java https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Java | 532 lines
                    
9
                    
10import javax.crypto.Cipher;
                    
11import javax.crypto.CipherSpi;
                    
22import org.bouncycastle.crypto.BlockCipher;
                    
23import org.bouncycastle.crypto.CipherParameters;
                    
24import org.bouncycastle.crypto.DataLengthException;
                    
27// BEGIN android-removed
                    
28// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
29// import org.bouncycastle.crypto.engines.DESEngine;
                    
424    // /**
                    
425    //  * Blowfish
                    
426    //  */
                    
426    //  */
                    
427    // static public class Blowfish_CFB8
                    
428    //     extends JCEStreamCipher
                    
                
JCEStreamCipher.java https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Java | 532 lines
                    
9
                    
10import javax.crypto.Cipher;
                    
11import javax.crypto.CipherSpi;
                    
22import org.bouncycastle.crypto.BlockCipher;
                    
23import org.bouncycastle.crypto.CipherParameters;
                    
24import org.bouncycastle.crypto.DataLengthException;
                    
27// BEGIN android-removed
                    
28// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
29// import org.bouncycastle.crypto.engines.DESEngine;
                    
424    // /**
                    
425    //  * Blowfish
                    
426    //  */
                    
426    //  */
                    
427    // static public class Blowfish_CFB8
                    
428    //     extends JCEStreamCipher
                    
                
DESCoder.java https://gitlab.com/0072016/es | Java | 132 lines
                    
2
                    
3import javax.crypto.Cipher;
                    
4import javax.crypto.SecretKey;
                    
12 * <pre>
                    
13 * 支持 DES、DESede(TripleDES,就是3DES)、AES、Blowfish、RC2、RC4(ARCFOUR)
                    
14 * DES                  key size must be equal to 56
                    
16 * AES                  key size must be equal to 128, 192 or 256,but 192 and 256 bits may not be available
                    
17 * Blowfish             key size must be multiple of 8, and can only range from 32 to 448 (inclusive)
                    
18 * RC2                  key size must be between 40 and 1024 bits
                    
34     * AES                  key size must be equal to 128, 192 or 256,but 192 and 256 bits may not be available
                    
35     * Blowfish             key size must be multiple of 8, and can only range from 32 to 448 (inclusive)
                    
36     * RC2                  key size must be between 40 and 1024 bits
                    
                
GuvnorBootstrapConfiguration.java https://github.com/seaver31/guvnor.git | Java | 126 lines
                    
21import java.util.Map;
                    
22import javax.crypto.Cipher;
                    
23import javax.crypto.spec.SecretKeySpec;
                    
97            byte[] kbytes = "jaas is the way".getBytes();
                    
98            SecretKeySpec key = new SecretKeySpec(kbytes, "Blowfish");
                    
99
                    
115
                    
116            Cipher cipher = Cipher.getInstance("Blowfish");
                    
117            cipher.init(Cipher.DECRYPT_MODE, key);
                    
                
AOSunJCECipher.java https://gitlab.com/edgardo001/clienteafirma | Java | 270 lines
                    
18import javax.crypto.BadPaddingException;
                    
19import javax.crypto.Cipher;
                    
20import javax.crypto.KeyGenerator;
                    
76        new AOCipherConfig(AOCipherAlgorithm.AES, AOCipherBlockMode.OFB, AOCipherPadding.ISO10126PADDING),
                    
77        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.ECB, AOCipherPadding.PKCS5PADDING),
                    
78        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.ECB, AOCipherPadding.ISO10126PADDING),
                    
78        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.ECB, AOCipherPadding.ISO10126PADDING),
                    
79        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.CBC, AOCipherPadding.PKCS5PADDING),
                    
80        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.CBC, AOCipherPadding.ISO10126PADDING),
                    
80        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.CBC, AOCipherPadding.ISO10126PADDING),
                    
81        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.PCBC, AOCipherPadding.PKCS5PADDING),
                    
82        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.PCBC, AOCipherPadding.ISO10126PADDING),
                    
82        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.PCBC, AOCipherPadding.ISO10126PADDING),
                    
83        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.CTR, AOCipherPadding.NOPADDING),
                    
84        new AOCipherConfig(AOCipherAlgorithm.BLOWFISH, AOCipherBlockMode.CTR, AOCipherPadding.PKCS5PADDING),
                    
                
Blowfish.py https://gitlab.com/sisfs/G_Music | Python | 121 lines
                    
2#
                    
3#  Cipher/Blowfish.py : Blowfish
                    
4#
                    
33
                    
34    >>> from Crypto.Cipher import Blowfish
                    
35    >>> from Crypto import Random
                    
40    >>> iv = Random.new().read(bs)
                    
41    >>> cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv)
                    
42    >>> plaintext = b'docendo discimus '
                    
47
                    
48.. _Blowfish: http://www.schneier.com/blowfish.html
                    
49
                    
55from Crypto.Cipher import blockalgo
                    
56from Crypto.Cipher import _Blowfish
                    
57
                    
                
GuvnorBootstrapConfiguration.java https://github.com/bounty12281/guvnor.git | Java | 126 lines
                    
21import java.util.Map;
                    
22import javax.crypto.Cipher;
                    
23import javax.crypto.spec.SecretKeySpec;
                    
97            byte[] kbytes = "jaas is the way".getBytes();
                    
98            SecretKeySpec key = new SecretKeySpec(kbytes, "Blowfish");
                    
99
                    
115
                    
116            Cipher cipher = Cipher.getInstance("Blowfish");
                    
117            cipher.init(Cipher.DECRYPT_MODE, key);
                    
                
_EKSBlowfish.py https://gitlab.com/abhi1tb/build | Python | 131 lines
                    
38_raw_blowfish_lib = load_pycryptodome_raw_lib(
                    
39        "Crypto.Cipher._raw_eksblowfish",
                    
40        """
                    
40        """
                    
41        int EKSBlowfish_start_operation(const uint8_t key[],
                    
42                                        size_t key_len,
                    
47                                        void **pResult);
                    
48        int EKSBlowfish_encrypt(const void *state,
                    
49                                const uint8_t *in,
                    
51                                size_t data_len);
                    
52        int EKSBlowfish_decrypt(const void *state,
                    
53                                const uint8_t *in,
                    
76
                    
77    start_operation = _raw_blowfish_lib.EKSBlowfish_start_operation
                    
78    stop_operation = _raw_blowfish_lib.EKSBlowfish_stop_operation
                    
                
PEMUtilities.java https://bitbucket.org/festevezga/xobotos.git | Java | 280 lines
                    
12
                    
13import javax.crypto.Cipher;
                    
14import javax.crypto.SecretKey;
                    
167        {
                    
168            alg = "Blowfish";
                    
169            sKey = getKey(password, alg, 16, iv);
                    
                
awalletextractor.py https://github.com/jwal/jwallib-retired.git | Python | 127 lines
                    
7    from Crypto.Hash import SHA256, SHA
                    
8    from Crypto.Cipher import AES, Blowfish, DES3
                    
9except ImportError, e:
                    
21            )),
                    
22    (Blowfish, (
                    
23            256,
                    
                
StringEncrypter.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 312 lines
                    
7// CIPHER / GENERATORS
                    
8import javax.crypto.Cipher;
                    
9import javax.crypto.SecretKey;
                    
224            SecretKey desKey = KeyGenerator.getInstance( "DES" ).generateKey();
                    
225            SecretKey blowfishKey = KeyGenerator.getInstance( "Blowfish" ).generateKey();
                    
226            SecretKey desedeKey = KeyGenerator.getInstance( "DESede" ).generateKey();
                    
229            StringEncrypter desEncrypter = new StringEncrypter( desKey, desKey.getAlgorithm() );
                    
230            StringEncrypter blowfishEncrypter = new StringEncrypter( blowfishKey, blowfishKey.getAlgorithm() );
                    
231            StringEncrypter desedeEncrypter = new StringEncrypter( desedeKey, desedeKey.getAlgorithm() );
                    
234            String desEncrypted = desEncrypter.encrypt( secretString );
                    
235            String blowfishEncrypted = blowfishEncrypter.encrypt( secretString );
                    
236            String desedeEncrypted = desedeEncrypter.encrypt( secretString );
                    
239            String desDecrypted = desEncrypter.decrypt( desEncrypted );
                    
240            String blowfishDecrypted = blowfishEncrypter.decrypt( blowfishEncrypted );
                    
241            String desedeDecrypted = desedeEncrypter.decrypt( desedeEncrypted );
                    
                
SilverCryptFactorySymetric.java https://github.com/cdemagneval/Silverpeas-Core.git | Java | 135 lines
                    
29import java.security.NoSuchAlgorithmException;
                    
30import javax.crypto.Cipher;
                    
31import javax.crypto.NoSuchPaddingException;
                    
34
                    
35  public static final String ALGORITHM = "Blowfish";
                    
36  /**
                    
                
DESCoder.java https://gitlab.com/BGCX262/zzsh-svn-to-git.git | Java | 165 lines
                    
9  
                    
10import javax.crypto.Cipher;  
                    
11import javax.crypto.KeyGenerator;  
                    
20 * <pre> 
                    
21 * 支持 DES、DESede(TripleDES,就是3DES)、AES、Blowfish、RC2、RC4(ARCFOUR) 
                    
22 * DES                  key size must be equal to 56 
                    
24 * AES                  key size must be equal to 128, 192 or 256,but 192 and 256 bits may not be available 
                    
25 * Blowfish             key size must be multiple of 8, and can only range from 32 to 448 (inclusive) 
                    
26 * RC2                  key size must be between 40 and 1024 bits 
                    
43     * AES                  key size must be equal to 128, 192 or 256,but 192 and 256 bits may not be available 
                    
44     * Blowfish             key size must be multiple of 8, and can only range from 32 to 448 (inclusive) 
                    
45     * RC2                  key size must be between 40 and 1024 bits 
                    
                
Blowfish.py https://gitlab.com/grayhamster/pycrypto | Python | 132 lines
                    
2#
                    
3#  Cipher/Blowfish.py : Blowfish
                    
4#
                    
33
                    
34    >>> from Crypto.Cipher import Blowfish
                    
35    >>> from Crypto import Random
                    
40    >>> iv = Random.new().read(bs)
                    
41    >>> cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv)
                    
42    >>> plaintext = b'docendo discimus '
                    
47
                    
48.. _Blowfish: http://www.schneier.com/blowfish.html
                    
49
                    
55from Crypto.Cipher import blockalgo
                    
56from Crypto.Cipher import _Blowfish
                    
57
                    
                
test_Blowfish.py https://gitlab.com/abhi1tb/build | Python | 162 lines
                    
2#
                    
3#  SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher
                    
4#
                    
24
                    
25"""Self-test suite for Crypto.Cipher.Blowfish"""
                    
26
                    
30
                    
31from Crypto.Cipher import Blowfish
                    
32
                    
119
                    
120        cipher = Blowfish.new(b'4'*16, Blowfish.MODE_ECB)
                    
121
                    
152    from .common import make_block_tests
                    
153    tests = make_block_tests(Blowfish, "Blowfish", test_data)
                    
154    tests.append(KeyLength())
                    
                
Blowfish.java https://bitbucket.org/rlyspn/androidrr.git | Java | 77 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11
                    
12public final class Blowfish
                    
13{
                    
13{
                    
14    private Blowfish()
                    
15    {
                    
22        {
                    
23            super(new BlowfishEngine());
                    
24        }
                    
31        {
                    
32            super(new CBCBlockCipher(new BlowfishEngine()), 64);
                    
33        }
                    
                
Mcrypt.java https://github.com/moriyoshi/quercus-gae.git | Java | 343 lines
                    
38
                    
39import javax.crypto.Cipher;
                    
40import javax.crypto.spec.IvParameterSpec;
                    
189      return 24;
                    
190    else if (McryptModule.MCRYPT_BLOWFISH.equals(_algorithm))
                    
191      return 56;
                    
197  {
                    
198    if (McryptModule.MCRYPT_BLOWFISH.equals(_algorithm))
                    
199      return false;
                    
245  {
                    
246    if (_algorithm.equals(McryptModule.MCRYPT_BLOWFISH))
                    
247      return false;
                    
315      return "DESede/" + mode + "/NoPadding";
                    
316    else if (McryptModule.MCRYPT_BLOWFISH.equals(algorithm)) {
                    
317      // php/1q0t, #2561
                    
                
Blowfish.java https://github.com/CyanogenMod/android_external_bouncycastle.git | Java | 77 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11
                    
12public final class Blowfish
                    
13{
                    
13{
                    
14    private Blowfish()
                    
15    {
                    
22        {
                    
23            super(new BlowfishEngine());
                    
24        }
                    
31        {
                    
32            super(new CBCBlockCipher(new BlowfishEngine()), 64);
                    
33        }
                    
                
Blowfish.java https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Java | 77 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11
                    
12public final class Blowfish
                    
13{
                    
13{
                    
14    private Blowfish()
                    
15    {
                    
22        {
                    
23            super(new BlowfishEngine());
                    
24        }
                    
31        {
                    
32            super(new CBCBlockCipher(new BlowfishEngine()), 64);
                    
33        }
                    
                
Blowfish.java https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk | Java | 77 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11
                    
12public final class Blowfish
                    
13{
                    
13{
                    
14    private Blowfish()
                    
15    {
                    
22        {
                    
23            super(new BlowfishEngine());
                    
24        }
                    
31        {
                    
32            super(new CBCBlockCipher(new BlowfishEngine()), 64);
                    
33        }
                    
                
Blowfish.java https://gitlab.com/brian0218/rk3288_r-box_android4.4.2_sdk | Java | 77 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11
                    
12public final class Blowfish
                    
13{
                    
13{
                    
14    private Blowfish()
                    
15    {
                    
22        {
                    
23            super(new BlowfishEngine());
                    
24        }
                    
31        {
                    
32            super(new CBCBlockCipher(new BlowfishEngine()), 64);
                    
33        }
                    
                
Blowfish.java https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Java | 77 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11
                    
12public final class Blowfish
                    
13{
                    
13{
                    
14    private Blowfish()
                    
15    {
                    
22        {
                    
23            super(new BlowfishEngine());
                    
24        }
                    
31        {
                    
32            super(new CBCBlockCipher(new BlowfishEngine()), 64);
                    
33        }
                    
                
X509Token.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 203 lines
                    
15import javax.crypto.BadPaddingException;
                    
16import javax.crypto.Cipher;
                    
17import javax.crypto.IllegalBlockSizeException;
                    
42 * <li>cipher_type =
                    
43 * RSA(default)/AES/Blowfish/DES/DESede/PBEWithMD5AndDES/PBEWithHmacSHA1AndDESede/RC2/RC4/RC5 - see
                    
44 * http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppA</li>
                    
                
PEMUtilities.java https://gitlab.com/edgardo001/bc-java | Java | 272 lines
                    
13
                    
14import javax.crypto.Cipher;
                    
15import javax.crypto.SecretKey;
                    
149        {
                    
150            alg = "Blowfish";
                    
151            sKey = getKey(helper, password, alg, 16, iv);
                    
                
__init__.py https://bitbucket.org/nicste/ballaxy.git | Python | 57 lines
                    
5
                    
6from Crypto.Cipher import Blowfish
                    
7from Crypto.Util.randpool import RandomPool
                    
35        self.id_secret = config['id_secret']
                    
36        self.id_cipher = Blowfish.new( self.id_secret )
                    
37    def encode_id( self, obj_id ):
                    
                
CRTSplitter.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 331 lines
                    
8   private long p[];
                    
9   private javax.crypto.Cipher c;
                    
10   private javax.crypto.SecretKey w;
                    
31	 c = 
                    
32	    javax.crypto.Cipher.getInstance(getAlgorithm() + "/ECB/NoPadding");
                    
33      }
                    
72   public static String getAlgorithm() {
                    
73      return "Blowfish";
                    
74   }
                    
116	 try {
                    
117	    c.init(javax.crypto.Cipher.ENCRYPT_MODE, w);
                    
118	 }
                    
130	    byte b[] = convert(rval[i]);
                    
131	    javax.crypto.CipherOutputStream cos = 
                    
132	       new javax.crypto.CipherOutputStream(bos, c);
                    
                
BookmarksReader.java https://github.com/codebling/VFSJFileChooser2.git | Java | 218 lines
                    
33import java.util.logging.Logger;
                    
34import javax.crypto.Cipher;
                    
35import javax.crypto.spec.SecretKeySpec;
                    
114
                    
115				SecretKeySpec skeyspec = new SecretKeySpec(raw, "Blowfish");
                    
116				Cipher cipher = Cipher.getInstance("Blowfish");
                    
                
encrypted.py https://bitbucket.org/vitormazzi/skink.git | Python | 106 lines
                    
6encrypted and safely encoded for storage in a unicode column using the powerful
                    
7and secure Blowfish Cipher using a specified "secret" which can be passed into
                    
8the plugin at class declaration time.
                    
28
                    
29from Crypto.Cipher          import Blowfish
                    
30from elixir.statements      import Statement
                    
41def encrypt_value(value, secret):
                    
42    return Blowfish.new(secret, Blowfish.MODE_CFB) \
                    
43                   .encrypt(value).encode('string_escape')
                    
45def decrypt_value(value, secret):
                    
46    return Blowfish.new(secret, Blowfish.MODE_CFB) \
                    
47                   .decrypt(value.decode('string_escape'))
                    
                
CipherWithWrappingSpi.java https://github.com/Morriar/ProxyJDK.git | Java | 261 lines
                    
38
                    
39import javax.crypto.Cipher;
                    
40import javax.crypto.CipherSpi;
                    
46/**
                    
47 * This class entends the javax.crypto.CipherSpi class with a concrete
                    
48 * implementation of the methods for wrapping and unwrapping
                    
53 *
                    
54 * @see javax.crypto.CipherSpi
                    
55 * @see BlowfishCipher
                    
                
BlowfishCBC.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 70 lines
                    
34
                    
35public class BlowfishCBC implements Cipher{
                    
36  private static final int ivsize=8;
                    
37  private static final int bsize=16;
                    
38  private javax.crypto.Cipher cipher;    
                    
39  public int getIVSize(){return ivsize;} 
                    
56      SecretKeySpec skeySpec = new SecretKeySpec(key, "Blowfish");
                    
57      cipher=javax.crypto.Cipher.getInstance("Blowfish/CBC/"+pad);
                    
58      cipher.init((mode==ENCRYPT_MODE?
                    
58      cipher.init((mode==ENCRYPT_MODE?
                    
59		   javax.crypto.Cipher.ENCRYPT_MODE:
                    
60		   javax.crypto.Cipher.DECRYPT_MODE),
                    
                
shiro.adoc https://github.com/apache/camel.git | AsciiDoc | 309 lines
                    
136
                    
137|`cipherService` |`AES` |org.apache.shiro.crypto.CipherService |Shiro ships with AES & Blowfish based CipherServices. You may use one
                    
138these or pass in your own Cipher implementation
                    
                
CipherWithWrappingSpi.java https://github.com/ikeji/openjdk7-jdk.git | Java | 261 lines
                    
38
                    
39import javax.crypto.Cipher;
                    
40import javax.crypto.CipherSpi;
                    
46/**
                    
47 * This class entends the javax.crypto.CipherSpi class with a concrete
                    
48 * implementation of the methods for wrapping and unwrapping
                    
53 *
                    
54 * @see javax.crypto.CipherSpi
                    
55 * @see BlowfishCipher
                    
                
shiro.adoc https://github.com/gnodet/camel.git | AsciiDoc | 306 lines
                    
135
                    
136|`cipherService` |`AES` |org.apache.shiro.crypto.CipherService |Shiro ships with AES & Blowfish based CipherServices. You may use one
                    
137these or pass in your own Cipher implementation
                    
                
ERXAbstractBlowfishCrypter.java https://github.com/amagavi/wonder.git | Java | 222 lines
                    
12/**
                    
13 * ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter
                    
14 * interface that allows subclasses to override the source of the blowfish key.
                    
15 * The blowfish cipher is a two-way cipher meaning the original string that was
                    
16 * encrypted can be retrieved. The way that this version of the blowfish cipher
                    
17 * is encrypted it is safe to use as a form value.
                    
20 */
                    
21public abstract class ERXAbstractBlowfishCrypter implements ERXCrypterInterface {
                    
22	/** Block size of blowfish encrypted strings */
                    
71		try {
                    
72			Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
                    
73			cipher.init(mode, secretBlowfishKey());
                    
175	 * Blowfish encodes a given string using the secret key specified in the
                    
176	 * System property: <b>ERBlowfishCipherKey</b>. The blowfish cipher is a
                    
177	 * two way cipher meaning that given the secret key you can de-cipher what
                    
                
setup.py https://bitbucket.org/Behemot/university-rep.git | Python | 164 lines
                    
78            # Block encryption algorithms
                    
79            Extension("Crypto.Cipher.AES",
                    
80                      include_dirs=['src/'],
                    
81                      sources=["src/AES.c"]),
                    
82            Extension("Crypto.Cipher.ARC2",
                    
83                      include_dirs=['src/'],
                    
84                      sources=["src/ARC2.c"]),
                    
85            Extension("Crypto.Cipher.Blowfish",
                    
86                      include_dirs=['src/'],
                    
86                      include_dirs=['src/'],
                    
87                      sources=["src/Blowfish.c"]),
                    
88            Extension("Crypto.Cipher.CAST",
                    
90                      sources=["src/CAST.c"]),
                    
91            Extension("Crypto.Cipher.DES",
                    
92                      include_dirs=['src/'],
                    
                
StringOBF.java https://gitlab.com/N00bVip/Noxious | Java | 88 lines
                    
7
                    
8import javax.crypto.Cipher;
                    
9import javax.crypto.spec.SecretKeySpec;
                    
16		SecretKeySpec sksSpec =
                    
17				new SecretKeySpec(key.getBytes(), "Blowfish");
                    
18
                    
18
                    
19		Cipher cipher = Cipher.getInstance("Blowfish");
                    
20		cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, sksSpec);
                    
51		    SecretKeySpec sksSpec =
                    
52		        new SecretKeySpec(key.getBytes(), "Blowfish");
                    
53
                    
53
                    
54		    Cipher cipher = Cipher.getInstance("Blowfish");
                    
55		    cipher.init(Cipher.DECRYPT_MODE, sksSpec);
                    
                
RepositoryStartupService.java https://github.com/matnil/guvnor.git | Java | 260 lines
                    
31
                    
32import javax.crypto.Cipher;
                    
33import javax.crypto.spec.SecretKeySpec;
                    
231            byte[] kbytes = "jaas is the way".getBytes();
                    
232            SecretKeySpec key = new SecretKeySpec(kbytes, "Blowfish");
                    
233
                    
249
                    
250            Cipher cipher = Cipher.getInstance("Blowfish");
                    
251            cipher.init(Cipher.DECRYPT_MODE, key);
                    
                
BlockCipherFactory.java https://github.com/brl/netifera.git | Java | 115 lines
                    
1
                    
2package com.trilead.ssh2.crypto.cipher;
                    
3
                    
35
                    
36		ciphers.addElement(new CipherEntry("aes256-ctr", 16, 32, "com.trilead.ssh2.crypto.cipher.AES"));
                    
37		ciphers.addElement(new CipherEntry("aes192-ctr", 16, 24, "com.trilead.ssh2.crypto.cipher.AES"));
                    
38		ciphers.addElement(new CipherEntry("aes128-ctr", 16, 16, "com.trilead.ssh2.crypto.cipher.AES"));
                    
39		ciphers.addElement(new CipherEntry("blowfish-ctr", 8, 16, "com.trilead.ssh2.crypto.cipher.BlowFish"));
                    
40
                    
40
                    
41		ciphers.addElement(new CipherEntry("aes256-cbc", 16, 32, "com.trilead.ssh2.crypto.cipher.AES"));
                    
42		ciphers.addElement(new CipherEntry("aes192-cbc", 16, 24, "com.trilead.ssh2.crypto.cipher.AES"));
                    
43		ciphers.addElement(new CipherEntry("aes128-cbc", 16, 16, "com.trilead.ssh2.crypto.cipher.AES"));
                    
44		ciphers.addElement(new CipherEntry("blowfish-cbc", 8, 16, "com.trilead.ssh2.crypto.cipher.BlowFish"));
                    
45		
                    
                
TestLadderEncoding.java https://github.com/ickik/TestLadder.git | Java | 131 lines
                    
8import javax.crypto.BadPaddingException;
                    
9import javax.crypto.Cipher;
                    
10import javax.crypto.IllegalBlockSizeException;
                    
24
                    
25	private static final String ALGORITHM = "Blowfish";
                    
26	private static final String TRANSFORMATION = "Blowfish/CBC/PKCS5Padding";
                    
34	 * stored in local.
                    
35	 * <br>The algorithm chooses is blowfish.
                    
36	 * @param login the login of the user used as key.
                    
37	 * @param password the password associates to the login.
                    
38	 * @return the password encrypted with blowfish algorithm.
                    
39	 * @throws LadderException this exception is thrown when an error occurs
                    
69	 * stored in local.
                    
70	 * <br>The algorithm chooses is blowfish.
                    
71	 * @param login the login of the user used as key.
                    
                
CipherService.java http://cng1985.googlecode.com/svn/ | Java | 176 lines
                    
53 * is never shared with anyone.
                    
54 * <h2>{@code CipherService}s vs JDK {@link javax.crypto.Cipher Cipher}s</h2>
                    
55 * Shiro {@code CipherService}s essentially do the same things as JDK {@link javax.crypto.Cipher Cipher}s, but in
                    
72 * <li><b>Type Safe</b> - There are {@code CipherService} implementations for different Cipher algorithms
                    
73 * ({@code AesCipherService}, {@code BlowfishCipherService}, etc).  There is only one JDK {@code Cipher} class to
                    
74 * represent all cipher algorithms/instances.
                    
82 *
                    
83 * @see BlowfishCipherService
                    
84 * @see AesCipherService
                    
                
ERXAbstractBlowfishCrypter.java https://github.com/hprange/wonder.git | Java | 222 lines
                    
12/**
                    
13 * ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter
                    
14 * interface that allows subclasses to override the source of the blowfish key.
                    
15 * The blowfish cipher is a two-way cipher meaning the original string that was
                    
16 * encrypted can be retrieved. The way that this version of the blowfish cipher
                    
17 * is encrypted it is safe to use as a form value.
                    
20 */
                    
21public abstract class ERXAbstractBlowfishCrypter implements ERXCrypterInterface {
                    
22	/** Block size of blowfish encrypted strings */
                    
71		try {
                    
72			Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
                    
73			cipher.init(mode, secretBlowfishKey());
                    
175	 * Blowfish encodes a given string using the secret key specified in the
                    
176	 * System property: <b>ERBlowfishCipherKey</b>. The blowfish cipher is a
                    
177	 * two way cipher meaning that given the secret key you can de-cipher what
                    
                
BlowfishCBC.java https://github.com/xv1t/SquidModel.GUI.git | Java | 70 lines
                    
34
                    
35public class BlowfishCBC implements Cipher{
                    
36  private static final int ivsize=8;
                    
37  private static final int bsize=16;
                    
38  private javax.crypto.Cipher cipher;    
                    
39  public int getIVSize(){return ivsize;} 
                    
56      SecretKeySpec skeySpec = new SecretKeySpec(key, "Blowfish");
                    
57      cipher=javax.crypto.Cipher.getInstance("Blowfish/CBC/"+pad);
                    
58      cipher.init((mode==ENCRYPT_MODE?
                    
58      cipher.init((mode==ENCRYPT_MODE?
                    
59		   javax.crypto.Cipher.ENCRYPT_MODE:
                    
60		   javax.crypto.Cipher.DECRYPT_MODE),
                    
                
gnu.javax.crypto.cipher.java https://github.com/facebook/pfff.git | Java | 400 lines
                    
1package gnu.javax.crypto.cipher;
                    
2class WeakKeyException {
                    
350}
                    
351class Blowfish {
                    
352  class Block {
                    
                
Blowfish.java https://gitlab.com/rizon/acid.git | Java | 294 lines
                    
3/**
                    
4 * Blowfish.java version 1.00.00
                    
5 *
                    
32import java.security.InvalidKeyException;
                    
33import javax.crypto.Cipher;
                    
34import javax.crypto.spec.SecretKeySpec;
                    
37
                    
38public class Blowfish
                    
39{
                    
39{
                    
40	private static final Logger log = LoggerFactory.getLogger(Blowfish.class);
                    
41
                    
42	/*
                    
43	 * Constructor of Blowfish class Key param
                    
44	 */
                    
                
TestOfBlowfish.java git://pkgs.fedoraproject.org/java-1.7.0-openjdk | Java | 148 lines
                    
1/* TestOfBlowfish.java -- 
                    
2   Copyright (C) 2006 Free Software Foundation, Inc.
                    
24
                    
25package gnu.testlet.gnu.javax.crypto.cipher;
                    
26
                    
27import gnu.java.security.util.Util;
                    
28import gnu.javax.crypto.cipher.Blowfish;
                    
29import gnu.javax.crypto.cipher.IBlockCipher;
                    
34/**
                    
35 * Conformance test for the Blowfish cipher.
                    
36 */
                    
36 */
                    
37public class TestOfBlowfish extends BaseCipherTestCase
                    
38{
                    
39  /**
                    
40   * Eric Young's Blowfish test vectors. See <a
                    
41   * href="http://www.counterpane.com/vectors.txt">http://www.counterpane.com/vectors.txt</a>.
                    
                
BlockCipherFactory.java https://bitbucket.org/zielmicha/connectbot.git | Java | 115 lines
                    
1
                    
2package com.trilead.ssh2.crypto.cipher;
                    
3
                    
35
                    
36		ciphers.addElement(new CipherEntry("aes256-ctr", 16, 32, "com.trilead.ssh2.crypto.cipher.AES"));
                    
37		ciphers.addElement(new CipherEntry("aes192-ctr", 16, 24, "com.trilead.ssh2.crypto.cipher.AES"));
                    
38		ciphers.addElement(new CipherEntry("aes128-ctr", 16, 16, "com.trilead.ssh2.crypto.cipher.AES"));
                    
39		ciphers.addElement(new CipherEntry("blowfish-ctr", 8, 16, "com.trilead.ssh2.crypto.cipher.BlowFish"));
                    
40
                    
40
                    
41		ciphers.addElement(new CipherEntry("aes256-cbc", 16, 32, "com.trilead.ssh2.crypto.cipher.AES"));
                    
42		ciphers.addElement(new CipherEntry("aes192-cbc", 16, 24, "com.trilead.ssh2.crypto.cipher.AES"));
                    
43		ciphers.addElement(new CipherEntry("aes128-cbc", 16, 16, "com.trilead.ssh2.crypto.cipher.AES"));
                    
44		ciphers.addElement(new CipherEntry("blowfish-cbc", 8, 16, "com.trilead.ssh2.crypto.cipher.BlowFish"));
                    
45		
                    
                
test_Blowfish.py https://github.com/timgarbos/Django-game-statistics.git | Python | 112 lines
                    
2#
                    
3#  SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher
                    
4#
                    
24
                    
25"""Self-test suite for Crypto.Cipher.Blowfish"""
                    
26
                    
102def get_tests(config={}):
                    
103    from Crypto.Cipher import Blowfish
                    
104    from common import make_block_tests
                    
104    from common import make_block_tests
                    
105    return make_block_tests(Blowfish, "Blowfish", test_data)
                    
106
                    
                
test_Blowfish.py https://gitlab.com/Smileyt/KomodoEdit | Python | 112 lines
                    
2#
                    
3#  SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher
                    
4#
                    
24
                    
25"""Self-test suite for Crypto.Cipher.Blowfish"""
                    
26
                    
102def get_tests(config={}):
                    
103    from Crypto.Cipher import Blowfish
                    
104    from common import make_block_tests
                    
104    from common import make_block_tests
                    
105    return make_block_tests(Blowfish, "Blowfish", test_data)
                    
106
                    
                
Turkish.java https://github.com/Morriar/ProxyJDK.git | Java | 49 lines
                    
32
                    
33import javax.crypto.Cipher;
                    
34
                    
42        System.out.println(Cipher.getInstance("rsa/ecb/pkcs1padding"));
                    
43        System.out.println(Cipher.getInstance("Blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
45        System.out.println(Cipher.getInstance("BLOWFISH"));
                    
46
                    
                
test_Blowfish.py https://github.com/beenje/plugin.video.M6Replay.git | Python | 112 lines
                    
2#
                    
3#  SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher
                    
4#
                    
24
                    
25"""Self-test suite for Crypto.Cipher.Blowfish"""
                    
26
                    
102def get_tests(config={}):
                    
103    from Crypto.Cipher import Blowfish
                    
104    from common import make_block_tests
                    
104    from common import make_block_tests
                    
105    return make_block_tests(Blowfish, "Blowfish", test_data)
                    
106
                    
                
test_Blowfish.py https://github.com/beenje/plugin.video.M6Replay.git | Python | 112 lines
                    
2#
                    
3#  SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher
                    
4#
                    
24
                    
25"""Self-test suite for Crypto.Cipher.Blowfish"""
                    
26
                    
102def get_tests(config={}):
                    
103    from Crypto.Cipher import Blowfish
                    
104    from common import make_block_tests
                    
104    from common import make_block_tests
                    
105    return make_block_tests(Blowfish, "Blowfish", test_data)
                    
106
                    
                
test_Blowfish.py https://github.com/beenje/plugin.video.M6Replay.git | Python | 112 lines
                    
2#
                    
3#  SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher
                    
4#
                    
24
                    
25"""Self-test suite for Crypto.Cipher.Blowfish"""
                    
26
                    
102def get_tests(config={}):
                    
103    from Crypto.Cipher import Blowfish
                    
104    from common import make_block_tests
                    
104    from common import make_block_tests
                    
105    return make_block_tests(Blowfish, "Blowfish", test_data)
                    
106
                    
                
BlockCipherFactory.java https://gitlab.com/imxieke/remote-desktop-clients | Java | 115 lines
                    
1
                    
2package com.trilead.ssh2.crypto.cipher;
                    
3
                    
35
                    
36		ciphers.addElement(new CipherEntry("aes256-ctr", 16, 32, "com.trilead.ssh2.crypto.cipher.AES"));
                    
37		ciphers.addElement(new CipherEntry("aes192-ctr", 16, 24, "com.trilead.ssh2.crypto.cipher.AES"));
                    
38		ciphers.addElement(new CipherEntry("aes128-ctr", 16, 16, "com.trilead.ssh2.crypto.cipher.AES"));
                    
39		ciphers.addElement(new CipherEntry("blowfish-ctr", 8, 16, "com.trilead.ssh2.crypto.cipher.BlowFish"));
                    
40
                    
40
                    
41		ciphers.addElement(new CipherEntry("aes256-cbc", 16, 32, "com.trilead.ssh2.crypto.cipher.AES"));
                    
42		ciphers.addElement(new CipherEntry("aes192-cbc", 16, 24, "com.trilead.ssh2.crypto.cipher.AES"));
                    
43		ciphers.addElement(new CipherEntry("aes128-cbc", 16, 16, "com.trilead.ssh2.crypto.cipher.AES"));
                    
44		ciphers.addElement(new CipherEntry("blowfish-cbc", 8, 16, "com.trilead.ssh2.crypto.cipher.BlowFish"));
                    
45		
                    
                
TestOfBlowfish.java https://github.com/clibrepo/04f6ea02286af71632b72d73554979a61da424cf681886674b21ecd595715c12.git | Java | 180 lines
                    
1package gnu.testlet.gnu.crypto.cipher;
                    
2
                    
3// ----------------------------------------------------------------------------
                    
4// $Id: TestOfBlowfish.java,v 1.3 2003/09/27 00:04:20 raif Exp $
                    
5//
                    
48
                    
49import gnu.crypto.cipher.Blowfish;
                    
50import gnu.crypto.cipher.IBlockCipher;
                    
56/**
                    
57 * <p>Conformance test for the Blowfish cipher.</p>
                    
58 *
                    
60 */
                    
61public class TestOfBlowfish extends BaseCipherTestCase {
                    
62
                    
66   /**
                    
67    * Eric Young's Blowfish test vectors. See <a
                    
68    * href="http://www.counterpane.com/vectors.txt">http://www.counterpane.com/vectors.txt</a>.
                    
                
CipherWithWrappingSpi.java https://gitlab.com/borneywpf/openjdk-7-src | Java | 261 lines
                    
38
                    
39import javax.crypto.Cipher;
                    
40import javax.crypto.CipherSpi;
                    
46/**
                    
47 * This class entends the javax.crypto.CipherSpi class with a concrete
                    
48 * implementation of the methods for wrapping and unwrapping
                    
53 *
                    
54 * @see javax.crypto.CipherSpi
                    
55 * @see BlowfishCipher
                    
                
Turkish.java https://github.com/ikeji/openjdk7-jdk.git | Java | 49 lines
                    
32
                    
33import javax.crypto.Cipher;
                    
34
                    
42        System.out.println(Cipher.getInstance("rsa/ecb/pkcs1padding"));
                    
43        System.out.println(Cipher.getInstance("Blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
45        System.out.println(Cipher.getInstance("BLOWFISH"));
                    
46
                    
                
crypto.py https://code.google.com/p/wallproxy-plugins/ | Python | 130 lines
                    
33
                    
34    _BlockSize = {'AES':16, 'ARC2':8, 'ARC4':1, 'Blowfish':8, 'CAST':8,
                    
35                  'DES':8, 'DES3':8, 'IDEA':8, 'RC5':8, 'XOR':1}
                    
63        if self.cipher=='RC5' and self.keysize in (1, 57): self.keysize=32
                    
64        #try to import Crypto.Cipher.xxxx
                    
65        try:
                    
65        try:
                    
66            cipherlib = __import__('Crypto.Cipher.'+self.cipher, fromlist='x')
                    
67            self._newobj = cipherlib.new
                    
                
cryptocipher.py https://github.com/dahool/vertaal.git | Python | 69 lines
                    
20import base64
                    
21from Crypto.Cipher import Blowfish
                    
22from django.conf import settings
                    
27            pwd = getattr(settings, 'SECRET_KEY')
                    
28        self.__cipher = Blowfish.new(pwd)
                    
29    def encrypt(self, text):
                    
39        return cleartext
                    
40    # Blowfish cipher needs 8 byte blocks to work with
                    
41    def __pad_file(self, text):
                    
                
package.html https://github.com/GunioRobot/MI424WR_GEN2_Rev_E-F.git | HTML | 253 lines
                    
157import gnu.crypto.assembly.TransformerException;
                    
158import gnu.crypto.cipher.Blowfish;
                    
159import gnu.crypto.cipher.IBlockCipher;
                    
167
                    
168Cascade ofbBlowfish = new Cascade();
                    
169Object modeNdx = ofbBlowfish.append(
                    
170    Stage.getInstance(
                    
171        ModeFactory.getInstance(Registry.OFB_MODE, new Blowfish(), 8),
                    
172        Direction.FORWARD));
                    
177Assembly asm = new Assembly();
                    
178asm.addPreTransformer(Transformer.getCascadeTransformer(ofbBlowfish));
                    
179asm.addPreTransformer(Transformer.getPaddingTransformer(pkcs7));
                    
                
TestOfAssembly.java https://github.com/clibrepo/04f6ea02286af71632b72d73554979a61da424cf681886674b21ecd595715c12.git | Java | 198 lines
                    
54import gnu.crypto.assembly.TransformerException;
                    
55import gnu.crypto.cipher.Blowfish;
                    
56import gnu.crypto.cipher.IBlockCipher;
                    
97
                    
98      // build an OFB-Blowfish cascade
                    
99      Cascade ofbBlowfish = new Cascade();
                    
99      Cascade ofbBlowfish = new Cascade();
                    
100      Object modeNdx = ofbBlowfish.append(
                    
101            Stage.getInstance(
                    
101            Stage.getInstance(
                    
102                  ModeFactory.getInstance(Registry.OFB_MODE, new Blowfish(), 8),
                    
103                  Direction.FORWARD));
                    
109      testcase.asm = new Assembly();
                    
110      testcase.asm.addPreTransformer(Transformer.getCascadeTransformer(ofbBlowfish));
                    
111      testcase.asm.addPreTransformer(Transformer.getPaddingTransformer(pkcs7));
                    
                
RegistrationManager.java https://github.com/petalslink/petals-studio.git | Java | 338 lines
                    
22
                    
23import javax.crypto.Cipher;
                    
24import javax.crypto.spec.SecretKeySpec;
                    
80
                    
81		this.secretKey = new SecretKeySpec( "BlabluBloBlik".getBytes(), "Blowfish" );
                    
82
                    
83		// Get the cipher
                    
84		this.cipher = Cipher.getInstance( "Blowfish" );
                    
85	}
                    
236	/**
                    
237	 * Encodes user information using the Blowfish encryption algorithm and a Base64.
                    
238	 * @param s the string to encode
                    
258	/**
                    
259	 * Decodes user information using the Blowfish encryption algorithm and a Base64.
                    
260	 * @param s the string to decode
                    
                
JCEKeyGenerator.java https://github.com/MIPS/external-bouncycastle.git | Java | 538 lines
                    
2
                    
3import org.bouncycastle.crypto.CipherKeyGenerator;
                    
4import org.bouncycastle.crypto.KeyGenerationParameters;
                    
174    /**
                    
175     * Blowfish
                    
176     */
                    
176     */
                    
177    public static class Blowfish
                    
178        extends JCEKeyGenerator
                    
179    {
                    
180        public Blowfish()
                    
181        {
                    
181        {
                    
182            super("Blowfish", 128, new CipherKeyGenerator());
                    
183        }
                    
                
Mcrypt.java https://github.com/GEFFROY/Quercus.git | Java | 393 lines
                    
38
                    
39import javax.crypto.Cipher;
                    
40import javax.crypto.spec.IvParameterSpec;
                    
200      return 24;
                    
201    else if (McryptModule.MCRYPT_BLOWFISH.equals(_algorithm))
                    
202      return 56;
                    
208  {
                    
209    if (McryptModule.MCRYPT_BLOWFISH.equals(_algorithm))
                    
210      return false;
                    
285  {
                    
286    if (_algorithm.equals(McryptModule.MCRYPT_BLOWFISH))
                    
287      return false;
                    
364      return "DESede/" + mode + "/NoPadding";
                    
365    else if (McryptModule.MCRYPT_BLOWFISH.equals(algorithm)) {
                    
366      // php/1q0t, #2561
                    
                
PEMUtilities.java https://gitlab.com/edgardo001/bc-java | Java | 272 lines
                    
13
                    
14import javax.crypto.Cipher;
                    
15import javax.crypto.SecretKey;
                    
149        {
                    
150            alg = "Blowfish";
                    
151            sKey = getKey(helper, password, alg, 16, iv);
                    
                
package.html https://github.com/sethish-mirrors/MI424WR_GEN2_Rev_E-F.git | HTML | 253 lines
                    
157import gnu.crypto.assembly.TransformerException;
                    
158import gnu.crypto.cipher.Blowfish;
                    
159import gnu.crypto.cipher.IBlockCipher;
                    
167
                    
168Cascade ofbBlowfish = new Cascade();
                    
169Object modeNdx = ofbBlowfish.append(
                    
170    Stage.getInstance(
                    
171        ModeFactory.getInstance(Registry.OFB_MODE, new Blowfish(), 8),
                    
172        Direction.FORWARD));
                    
177Assembly asm = new Assembly();
                    
178asm.addPreTransformer(Transformer.getCascadeTransformer(ofbBlowfish));
                    
179asm.addPreTransformer(Transformer.getPaddingTransformer(pkcs7));
                    
                
JCEStreamCipher.java https://github.com/kllrnohj/keepassdroid.git | Java | 622 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
7import org.bouncycastle.crypto.StreamCipher;
                    
8//import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
9//import org.bouncycastle.crypto.engines.DESEngine;
                    
23
                    
24import javax.crypto.Cipher;
                    
25import javax.crypto.NoSuchPaddingException;
                    
420    /**
                    
421     * Blowfish
                    
422     */
                    
423    /*
                    
424    static public class Blowfish_CFB8
                    
425        extends JCEStreamCipher
                    
                
models.py https://github.com/goodguy/satchmo.git | Python | 127 lines
                    
5
                    
6from Crypto.Cipher import Blowfish
                    
7from datetime import datetime
                    
111    """Decrypt code encrypted by _encrypt_code"""
                    
112    # In some blowfish implementations, > 56 char keys can cause problems
                    
113    secret_key = settings.SECRET_KEY[:56]
                    
113    secret_key = settings.SECRET_KEY[:56]
                    
114    encryption_object = Blowfish.new(secret_key)
                    
115    # strip padding from decrypted credit card number
                    
119    """Quick encrypter for CC codes or code fragments"""
                    
120    # In some blowfish implementations, > 56 char keys can cause problems
                    
121    secret_key = settings.SECRET_KEY[:56]
                    
121    secret_key = settings.SECRET_KEY[:56]
                    
122    encryption_object = Blowfish.new(secret_key)
                    
123    # block cipher length must be a multiple of 8
                    
                
ERXAbstractBlowfishCrypter.java https://bitbucket.org/molequedeideias/wonder.git | Java | 226 lines
                    
14/**
                    
15 * ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter
                    
16 * interface that allows subclasses to override the source of the blowfish key.
                    
17 * The blowfish cipher is a two-way cipher meaning the original string that was
                    
18 * encrypted can be retrieved. The way that this version of the blowfish cipher
                    
19 * is encrypted it is safe to use as a form value.
                    
22 */
                    
23public abstract class ERXAbstractBlowfishCrypter implements ERXCrypterInterface {
                    
24	public static final Logger log = Logger.getLogger(ERXCrypto.class);
                    
75		try {
                    
76			Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
                    
77			cipher.init(mode, secretBlowfishKey());
                    
179	 * Blowfish encodes a given string using the secret key specified in the
                    
180	 * System property: <b>ERBlowfishCipherKey</b>. The blowfish cipher is a
                    
181	 * two way cipher meaning that given the secret key you can de-cipher what
                    
                
Turkish.java https://github.com/srisatish/openjdk.git | Java | 49 lines
                    
32
                    
33import javax.crypto.Cipher;
                    
34
                    
42        System.out.println(Cipher.getInstance("rsa/ecb/pkcs1padding"));
                    
43        System.out.println(Cipher.getInstance("Blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
45        System.out.println(Cipher.getInstance("BLOWFISH"));
                    
46
                    
                
X509Token.java https://github.com/jiwils/JGroups.git | Java | 202 lines
                    
15import javax.crypto.BadPaddingException;
                    
16import javax.crypto.Cipher;
                    
17import javax.crypto.IllegalBlockSizeException;
                    
42 * <li>cipher_type =
                    
43 * RSA(default)/AES/Blowfish/DES/DESede/PBEWithMD5AndDES/PBEWithHmacSHA1AndDESede/RC2/RC4/RC5 - see
                    
44 * http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppA</li>
                    
                
JCEStreamCipher.java https://bitbucket.org/festevezga/xobotos.git | Java | 526 lines
                    
9
                    
10import javax.crypto.Cipher;
                    
11import javax.crypto.NoSuchPaddingException;
                    
21import org.bouncycastle.crypto.BlockCipher;
                    
22import org.bouncycastle.crypto.CipherParameters;
                    
23import org.bouncycastle.crypto.DataLengthException;
                    
26// BEGIN android-removed
                    
27// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
28// import org.bouncycastle.crypto.engines.DESEngine;
                    
418    // /**
                    
419    //  * Blowfish
                    
420    //  */
                    
420    //  */
                    
421    // static public class Blowfish_CFB8
                    
422    //     extends JCEStreamCipher
                    
                
Turkish.java https://github.com/ohpauleez/soymacchiato.git | Java | 49 lines
                    
32
                    
33import javax.crypto.Cipher;
                    
34
                    
42        System.out.println(Cipher.getInstance("rsa/ecb/pkcs1padding"));
                    
43        System.out.println(Cipher.getInstance("Blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
45        System.out.println(Cipher.getInstance("BLOWFISH"));
                    
46
                    
                
CipherFactory.java https://github.com/GunioRobot/MI424WR_GEN2_Rev_E-F.git | Java | 150 lines
                    
1package gnu.crypto.cipher;
                    
2
                    
91         result = new Anubis();
                    
92      } else if (name.equalsIgnoreCase(BLOWFISH_CIPHER)) {
                    
93         result = new Blowfish();
                    
133      hs.add(ANUBIS_CIPHER);
                    
134      hs.add(BLOWFISH_CIPHER);
                    
135      hs.add(DES_CIPHER);
                    
                
gdata.Crypto.Cipher.html https://github.com/tedsuo/revent-lite.git | HTML | 51 lines
                    
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                    
3<html><head><title>Python: package gdata.Crypto.Cipher</title>
                    
4</head><body bgcolor="#f0f0f8">
                    
23&nbsp;<br>
                    
24Crypto.Cipher.AES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Advanced&nbsp;Encryption&nbsp;Standard<br>
                    
25Crypto.Cipher.ARC2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alleged&nbsp;RC2<br>
                    
26Crypto.Cipher.ARC4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alleged&nbsp;RC4<br>
                    
27Crypto.Cipher.Blowfish<br>
                    
28Crypto.Cipher.CAST<br>
                    
28Crypto.Cipher.CAST<br>
                    
29Crypto.Cipher.DES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;Data&nbsp;Encryption&nbsp;Standard.&nbsp;&nbsp;Very&nbsp;commonly&nbsp;used<br>
                    
30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;the&nbsp;past,&nbsp;but&nbsp;today&nbsp;its&nbsp;56-bit&nbsp;keys&nbsp;are&nbsp;too&nbsp;small.<br>
                    
30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;the&nbsp;past,&nbsp;but&nbsp;today&nbsp;its&nbsp;56-bit&nbsp;keys&nbsp;are&nbsp;too&nbsp;small.<br>
                    
31Crypto.Cipher.DES3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Triple&nbsp;DES.<br>
                    
32Crypto.Cipher.IDEA<br>
                    
                
ERXAbstractBlowfishCrypter.java https://github.com/asso-cocktail/wonder.git | Java | 226 lines
                    
14/**
                    
15 * ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter
                    
16 * interface that allows subclasses to override the source of the blowfish key.
                    
17 * The blowfish cipher is a two-way cipher meaning the original string that was
                    
18 * encrypted can be retrieved. The way that this version of the blowfish cipher
                    
19 * is encrypted it is safe to use as a form value.
                    
22 */
                    
23public abstract class ERXAbstractBlowfishCrypter implements ERXCrypterInterface {
                    
24	public static final Logger log = Logger.getLogger(ERXCrypto.class);
                    
75		try {
                    
76			Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
                    
77			cipher.init(mode, secretBlowfishKey());
                    
179	 * Blowfish encodes a given string using the secret key specified in the
                    
180	 * System property: <b>ERBlowfishCipherKey</b>. The blowfish cipher is a
                    
181	 * two way cipher meaning that given the secret key you can de-cipher what
                    
                
Blowfish.py https://gitlab.com/abhi1tb/build | Python | 159 lines
                    
2#
                    
3#  Cipher/Blowfish.py : Blowfish
                    
4#
                    
41_raw_blowfish_lib = load_pycryptodome_raw_lib(
                    
42        "Crypto.Cipher._raw_blowfish",
                    
43        """
                    
43        """
                    
44        int Blowfish_start_operation(const uint8_t key[],
                    
45                                     size_t key_len,
                    
46                                     void **pResult);
                    
47        int Blowfish_encrypt(const void *state,
                    
48                             const uint8_t *in,
                    
73    start_operation = _raw_blowfish_lib.Blowfish_start_operation
                    
74    stop_operation = _raw_blowfish_lib.Blowfish_stop_operation
                    
75
                    
                
Turkish.java https://github.com/shchiu/openjdk.git | Java | 49 lines
                    
32
                    
33import javax.crypto.Cipher;
                    
34
                    
42        System.out.println(Cipher.getInstance("rsa/ecb/pkcs1padding"));
                    
43        System.out.println(Cipher.getInstance("Blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
45        System.out.println(Cipher.getInstance("BLOWFISH"));
                    
46
                    
                
Turkish.java https://github.com/mgene/openjdk.git | Java | 49 lines
                    
32
                    
33import javax.crypto.Cipher;
                    
34
                    
42        System.out.println(Cipher.getInstance("rsa/ecb/pkcs1padding"));
                    
43        System.out.println(Cipher.getInstance("Blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
44        System.out.println(Cipher.getInstance("blowfish"));
                    
45        System.out.println(Cipher.getInstance("BLOWFISH"));
                    
46
                    
                
CipherFactory.java https://github.com/sethish-mirrors/MI424WR_GEN2_Rev_E-F.git | Java | 150 lines
                    
1package gnu.crypto.cipher;
                    
2
                    
91         result = new Anubis();
                    
92      } else if (name.equalsIgnoreCase(BLOWFISH_CIPHER)) {
                    
93         result = new Blowfish();
                    
133      hs.add(ANUBIS_CIPHER);
                    
134      hs.add(BLOWFISH_CIPHER);
                    
135      hs.add(DES_CIPHER);
                    
                
util.py https://bitbucket.org/nicste/ballaxy.git | Python | 32 lines
                    
2pkg_resources.require( "pycrypto" )
                    
3from Crypto.Cipher import Blowfish
                    
4
                    
14        user_hash = ( "!" * ( 8 - len( user_hash ) % 8 ) ) + user_hash
                    
15        cipher = Blowfish.new( str( dataset.create_time ) )
                    
16        user_hash = cipher.encrypt( user_hash ).encode( 'hex' )
                    
27    else:
                    
28        cipher = Blowfish.new( str( dataset.create_time ) )
                    
29        user_id = cipher.decrypt( user_hash.decode( 'hex' ) ).lstrip( "!" )
                    
                
Poco.Crypto.CipherFactory.html git://pkgs.fedoraproject.org/poco | HTML | 75 lines
                    
25<div class="description">
                    
26<p>A factory for <a href="Poco.Crypto.Cipher.html" title="class Poco::Crypto::Cipher">Cipher</a> objects. See the <a href="Poco.Crypto.Cipher.html" title="class Poco::Crypto::Cipher">Cipher</a> class for examples on how to use the <a href="Poco.Crypto.CipherFactory.html" title="class Poco::Crypto::CipherFactory">CipherFactory</a>. </p>
                    
27</div>
                    
28<h2>Member Summary</h2>
                    
29<p><b>Member Functions: </b><a href="Poco.Crypto.CipherFactory.html#38" title="Poco::Crypto::CipherFactory::createCipher()">createCipher</a>, <a href="Poco.Crypto.CipherFactory.html#43" title="Poco::Crypto::CipherFactory::defaultFactory()">defaultFactory</a></p>
                    
30<h2>Constructors</h2>
                    
31<h3><a name="36">CipherFactory</a></h3>
                    
32<p class="decl"><a href="Poco.Crypto.CipherFactory.html" title="class Poco::Crypto::CipherFactory">CipherFactory</a>();</p>
                    
33<div class="description">
                    
43<h3><a name="38">createCipher</a></h3>
                    
44<p class="decl"><a href="Poco.Crypto.Cipher.html" title="class Poco::Crypto::Cipher">Cipher</a> * createCipher(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Crypto.CipherKey.html" title="class Poco::Crypto::CipherKey">CipherKey</a> &amp; key<br />);</p>
                    
45<div class="description">
                    
45<div class="description">
                    
46<p>Creates a <a href="Poco.Crypto.Cipher.html" title="class Poco::Crypto::Cipher">Cipher</a> object for the given <a href="Poco.Crypto.Cipher.html" title="class Poco::Crypto::Cipher">Cipher</a> name. Valid cipher  names depend on the OpenSSL version the library is linked with;   see the output of </p>
                    
47<p></p>
                    
                
BlowfishSerializer.java https://gitlab.com/kidaa/kryo.git | Java | 82 lines
                    
23
                    
24import javax.crypto.Cipher;
                    
25import javax.crypto.CipherInputStream;
                    
25import javax.crypto.CipherInputStream;
                    
26import javax.crypto.CipherOutputStream;
                    
27import javax.crypto.spec.SecretKeySpec;
                    
34
                    
35/** Encrypts data using the blowfish cipher.
                    
36 * @author Nathan Sweet <misc@n4te.com> */
                    
36 * @author Nathan Sweet <misc@n4te.com> */
                    
37public class BlowfishSerializer extends Serializer {
                    
38	private final Serializer serializer;
                    
40
                    
41	public BlowfishSerializer (Serializer serializer, byte[] key) {
                    
42		this.serializer = serializer;
                    
                
__init__.py https://github.com/volpino/Yeps-EURAC.git | Python | 58 lines
                    
5
                    
6from Crypto.Cipher import Blowfish
                    
7from Crypto.Util.randpool import RandomPool
                    
35        self.id_secret = config['id_secret']
                    
36        self.id_cipher = Blowfish.new( self.id_secret )
                    
37    def encode_id( self, obj_id ):
                    
                
__init__.py https://github.com/dahool/vertaal.git | Python | 120 lines
                    
35        Cipher.__init__(self, key)
                    
36        self.__cipher = Blowfish(key)
                    
37    
                    
60
                    
61    # Blowfish cipher needs 8 byte blocks to work with
                    
62    def __pad_text(self, text):
                    
81        Cipher.__init__(self, key)
                    
82        self.__cipher = Blowfish.new(key)
                    
83        
                    
115try:        
                    
116    from Crypto.Cipher import Blowfish
                    
117    cipher = CryptoCipher
                    
118except:
                    
119    from blowfishcipher.blowfish import Blowfish
                    
120    cipher = LocalCipher
                    
                
Obfuscator.java https://github.com/metlos/RHQ-old.git | Java | 121 lines
                    
26import javax.crypto.BadPaddingException;
                    
27import javax.crypto.Cipher;
                    
28import javax.crypto.IllegalBlockSizeException;
                    
44    private static final byte[] KEY = "jaas is the way".getBytes();
                    
45    public static final String ALGORITHM = "Blowfish";
                    
46
                    
                
CipherFactory.java https://github.com/clibrepo/04f6ea02286af71632b72d73554979a61da424cf681886674b21ecd595715c12.git | Java | 150 lines
                    
1package gnu.crypto.cipher;
                    
2
                    
91         result = new Anubis();
                    
92      } else if (name.equalsIgnoreCase(BLOWFISH_CIPHER)) {
                    
93         result = new Blowfish();
                    
133      hs.add(ANUBIS_CIPHER);
                    
134      hs.add(BLOWFISH_CIPHER);
                    
135      hs.add(DES_CIPHER);
                    
                
JCEBlockCipher.java https://github.com/kllrnohj/keepassdroid.git | Java | 1405 lines
                    
4import org.bouncycastle.crypto.BufferedBlockCipher;
                    
5import org.bouncycastle.crypto.CipherParameters;
                    
6import org.bouncycastle.crypto.DataLengthException;
                    
9import org.bouncycastle.crypto.engines.AESFastEngine;
                    
10import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
11import org.bouncycastle.crypto.engines.CAST5Engine;
                    
64import javax.crypto.BadPaddingException;
                    
65import javax.crypto.Cipher;
                    
66import javax.crypto.IllegalBlockSizeException;
                    
                
Cipher.hs git://github.com/vincenthz/hs-cryptocipher.git | Haskell | 57 lines
                    
1-- |
                    
2-- Module      : Crypto.Cipher
                    
3-- License     : BSD-style
                    
12--
                    
13-- > import Crypto.Cipher
                    
14-- > import Data.ByteString (ByteString)
                    
23--
                    
24module Crypto.Cipher
                    
25    (
                    
45    , AES128, AES192, AES256
                    
46    , Blowfish, Blowfish64, Blowfish128, Blowfish256, Blowfish448
                    
47    , DES
                    
53import Crypto.Cipher.AES (AES128, AES192, AES256)
                    
54import Crypto.Cipher.Blowfish
                    
55import Crypto.Cipher.DES
                    
                
JCEStreamCipher.java https://github.com/RedDrgn/keepassdroid.git | Java | 622 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
7import org.bouncycastle.crypto.StreamCipher;
                    
8//import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
9//import org.bouncycastle.crypto.engines.DESEngine;
                    
23
                    
24import javax.crypto.Cipher;
                    
25import javax.crypto.NoSuchPaddingException;
                    
420    /**
                    
421     * Blowfish
                    
422     */
                    
423    /*
                    
424    static public class Blowfish_CFB8
                    
425        extends JCEStreamCipher
                    
                
T_Cipher.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 629 lines
                    
53// PT
                    
54import javax.crypto.Cipher;
                    
55import javax.crypto.spec.SecretKeySpec;
                    
282    /*
                    
283    private void testBlowfish()
                    
284    {
                    
284    {
                    
285        System.out.println("Running testBlowfish");
                    
286        try
                    
295            System.out.println("key length is " + buf.length);
                    
296            SecretKeySpec sKeySpec = new SecretKeySpec(buf,"Blowfish");
                    
297            // SecretKeySpec sKeySpec = new SecretKeySpec(buf,"DESede");
                    
298
                    
299            Cipher cipher = Cipher.getInstance("Blowfish/CBC/NoPadding");
                    
300            // Cipher cipher = Cipher.getInstance("DESede/CBC/NoPadding");
                    
                
KeyGen.java http://aionxemu.googlecode.com/svn/trunk/ | Java | 97 lines
                    
22
                    
23import javax.crypto.Cipher;
                    
24import javax.crypto.KeyGenerator;
                    
30/**
                    
31 * Key generator. It generates keys or keyPairs for Blowfish and RSA
                    
32 *
                    
41    /**
                    
42     * Key generator for blowfish
                    
43     */
                    
43     */
                    
44    private static KeyGenerator blowfishKeyGen;
                    
45
                    
58
                    
59        blowfishKeyGen = KeyGenerator.getInstance("Blowfish");
                    
60
                    
                
ERXAbstractBlowfishCrypter.java https://github.com/wkhatch/wonder.git | Java | 226 lines
                    
14/**
                    
15 * ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter
                    
16 * interface that allows subclasses to override the source of the blowfish key.
                    
17 * The blowfish cipher is a two-way cipher meaning the original string that was
                    
18 * encrypted can be retrieved. The way that this version of the blowfish cipher
                    
19 * is encrypted it is safe to use as a form value.
                    
22 */
                    
23public abstract class ERXAbstractBlowfishCrypter implements ERXCrypterInterface {
                    
24	public static final Logger log = Logger.getLogger(ERXCrypto.class);
                    
75		try {
                    
76			Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
                    
77			cipher.init(mode, secretBlowfishKey());
                    
179	 * Blowfish encodes a given string using the secret key specified in the
                    
180	 * System property: <b>ERBlowfishCipherKey</b>. The blowfish cipher is a
                    
181	 * two way cipher meaning that given the secret key you can de-cipher what
                    
                
BlowfishEngine.java https://bitbucket.org/festevezga/xobotos.git | Java | 576 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
8/**
                    
9 * A class that provides Blowfish key encryption operations,
                    
10 * such as encoding data and generating keys.
                    
13 */
                    
14public final class BlowfishEngine
                    
15implements BlockCipher
                    
                
EncryptedPrivateKeyInfoTest.java https://bitbucket.org/aways/android_libcore.git | Java | 1234 lines
                    
42import javax.crypto.BadPaddingException;
                    
43import javax.crypto.Cipher;
                    
44import javax.crypto.EncryptedPrivateKeyInfo;
                    
93
                    
94            // Blowfish
                    
95            // NO OIDs for Blowfish defined (?)
                    
96            { "Blowfish", null },
                    
97            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
98            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
98            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
99            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
100            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
CipherTest.java https://bitbucket.org/aways/android_libcore.git | Java | 960 lines
                    
47import javax.crypto.BadPaddingException;
                    
48import javax.crypto.Cipher;
                    
49import javax.crypto.IllegalBlockSizeException;
                    
283
                    
284        setExpectedBlockSize("BLOWFISH", 8);
                    
285
                    
                
GnuCrypto.java https://github.com/GunioRobot/MI424WR_GEN2_Rev_E-F.git | Java | 471 lines
                    
86               put("Cipher.ARCFOUR ImplementedIn", "Software");
                    
87               put("Cipher.BLOWFISH", gnu.crypto.jce.cipher.BlowfishSpi.class.getName());
                    
88               put("Cipher.BLOWFISH ImplementedIn", "Software");
                    
114                   gnu.crypto.jce.cipher.PBES2.HMacHaval.Anubis.class.getName());
                    
115               put("Cipher.PBEWithHMacHavalAndBlowfish",
                    
116                   gnu.crypto.jce.cipher.PBES2.HMacHaval.Blowfish.class.getName());
                    
157               put("Cipher.PBEWithHMacMD4AndBlowfish",
                    
158                   gnu.crypto.jce.cipher.PBES2.HMacMD4.Blowfish.class.getName());
                    
159               put("Cipher.PBEWithHMacMD4AndCast5",
                    
178               put("Cipher.PBEWithHMacMD5AndBlowfish",
                    
179                   gnu.crypto.jce.cipher.PBES2.HMacMD5.Blowfish.class.getName());
                    
180               put("Cipher.PBEWithHMacMD5AndCast5",
                    
198                   gnu.crypto.jce.cipher.PBES2.HMacSHA1.Anubis.class.getName());
                    
199               put("Cipher.PBEWithHMacSHA1AndBlowfish",
                    
200                   gnu.crypto.jce.cipher.PBES2.HMacSHA1.Blowfish.class.getName());
                    
                
Blowfish.java https://github.com/GunioRobot/MI424WR_GEN2_Rev_E-F.git | Java | 586 lines
                    
1package gnu.crypto.cipher;
                    
2
                    
3// ----------------------------------------------------------------------------
                    
4// $Id: Blowfish.java,v 1.2 2005/10/20 12:04:28 alexa Exp $
                    
5//
                    
57/**
                    
58 * Blowfish is a 16-round, 64-bit Feistel cipher designed by Bruce
                    
59 * Schneier. It accepts a variable-length key of up to 448 bits.
                    
64 *    336--339, 647--654 (1996 Bruce Schneier).</li>
                    
65 *    <li><a href="http://www.counterpane.com/blowfish.html">The
                    
66 *    Blowfish Encryption Algorithm.</a></li>
                    
68 */
                    
69public class Blowfish extends BaseCipher {
                    
70
                    
                
JCEStreamCipher.java https://github.com/JasonBunting/keepassdroid.git | Java | 622 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
7import org.bouncycastle.crypto.StreamCipher;
                    
8//import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
9//import org.bouncycastle.crypto.engines.DESEngine;
                    
23
                    
24import javax.crypto.Cipher;
                    
25import javax.crypto.NoSuchPaddingException;
                    
420    /**
                    
421     * Blowfish
                    
422     */
                    
423    /*
                    
424    static public class Blowfish_CFB8
                    
425        extends JCEStreamCipher
                    
                
JCEStreamCipher.java https://bitbucket.org/rlyspn/androidrr.git | Java | 647 lines
                    
17import javax.crypto.BadPaddingException;
                    
18import javax.crypto.Cipher;
                    
19import javax.crypto.CipherSpi;
                    
33import org.bouncycastle.crypto.BlockCipher;
                    
34import org.bouncycastle.crypto.CipherParameters;
                    
35import org.bouncycastle.crypto.DataLengthException;
                    
38// BEGIN android-removed
                    
39// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
40// import org.bouncycastle.crypto.engines.DESEngine;
                    
                
BlowfishEngine.java https://bitbucket.org/rlyspn/androidrr.git | Java | 576 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
8/**
                    
9 * A class that provides Blowfish key encryption operations,
                    
10 * such as encoding data and generating keys.
                    
13 */
                    
14public final class BlowfishEngine
                    
15implements BlockCipher
                    
                
EncryptedPrivateKeyInfoTest.java https://bitbucket.org/rlyspn/androidrr.git | Java | 1232 lines
                    
39import javax.crypto.BadPaddingException;
                    
40import javax.crypto.Cipher;
                    
41import javax.crypto.EncryptedPrivateKeyInfo;
                    
90
                    
91            // Blowfish
                    
92            // NO OIDs for Blowfish defined (?)
                    
93            { "Blowfish", null },
                    
94            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
96            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
97            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
fish.py https://github.com/freshprince/weechat-fish.git | Python | 1034 lines
                    
22#
                    
23# NOTE: Blowfish and DH1080 implementation is licenced under a different
                    
24# license:
                    
76try:
                    
77    import Crypto.Cipher.Blowfish
                    
78except ImportError:
                    
188##
                    
189# Blowfish and DH1080 Code:
                    
190##
                    
200                key = key[:72]
                    
201            self.blowfish = Crypto.Cipher.Blowfish.new(
                    
202                    key.encode('utf-8'), Crypto.Cipher.Blowfish.MODE_ECB)
                    
275
                    
276        cbcCipher = Crypto.Cipher.Blowfish.new(
                    
277                key.encode('utf-8'), Crypto.Cipher.Blowfish.MODE_CBC, iv)
                    
                
BlowFish.java https://bitbucket.org/zielmicha/irssiconnectbot.git | Java | 403 lines
                    
1
                    
2package com.trilead.ssh2.crypto.cipher;
                    
3
                    
30/**
                    
31 * A class that provides Blowfish key encryption operations, such as encoding
                    
32 * data and generating keys. All the algorithms herein are from Applied
                    
35 * @author See comments in the source file
                    
36 * @version $Id: BlowFish.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
                    
37 */
                    
37 */
                    
38public class BlowFish implements BlockCipher
                    
39{
                    
                
BlowFish.java https://bitbucket.org/zielmicha/connectbot.git | Java | 403 lines
                    
1
                    
2package com.trilead.ssh2.crypto.cipher;
                    
3
                    
30/**
                    
31 * A class that provides Blowfish key encryption operations, such as encoding
                    
32 * data and generating keys. All the algorithms herein are from Applied
                    
35 * @author See comments in the source file
                    
36 * @version $Id: BlowFish.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
                    
37 */
                    
37 */
                    
38public class BlowFish implements BlockCipher
                    
39{
                    
                
GnuCrypto.java https://bitbucket.org/pizzafactory/pf-gcc.git | Java | 598 lines
                    
41import gnu.java.security.Registry;
                    
42import gnu.javax.crypto.cipher.CipherFactory;
                    
43import gnu.javax.crypto.mac.MacFactory;
                    
74        put("Cipher.ARCFOUR ImplementedIn", "Software");
                    
75        put("Cipher.BLOWFISH",
                    
76            gnu.javax.crypto.jce.cipher.BlowfishSpi.class.getName());
                    
76            gnu.javax.crypto.jce.cipher.BlowfishSpi.class.getName());
                    
77        put("Cipher.BLOWFISH ImplementedIn", "Software");
                    
78        put("Cipher.DES", gnu.javax.crypto.jce.cipher.DESSpi.class.getName());
                    
112            gnu.javax.crypto.jce.cipher.PBES2.HMacHaval.Anubis.class.getName());
                    
113        put("Cipher.PBEWithHMacHavalAndBlowfish",
                    
114            gnu.javax.crypto.jce.cipher.PBES2.HMacHaval.Blowfish.class.getName());
                    
133            gnu.javax.crypto.jce.cipher.PBES2.HMacMD2.Anubis.class.getName());
                    
134        put("Cipher.PBEWithHMacMD2AndBlowfish",
                    
135            gnu.javax.crypto.jce.cipher.PBES2.HMacMD2.Blowfish.class.getName());
                    
                
Blowfish.java https://bitbucket.org/pizzafactory/pf-gcc.git | Java | 611 lines
                    
1/* Blowfish.java --
                    
2   Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
                    
43
                    
44package gnu.javax.crypto.cipher;
                    
45
                    
53/**
                    
54 * Blowfish is a 16-round, 64-bit Feistel cipher designed by Bruce Schneier. It
                    
55 * accepts a variable-length key of up to 448 bits.
                    
60 * 647--654 (1996 Bruce Schneier).</li>
                    
61 * <li><a href="http://www.counterpane.com/blowfish.html">The Blowfish
                    
62 * Encryption Algorithm.</a></li>
                    
64 */
                    
65public class Blowfish
                    
66    extends BaseCipher
                    
                
ERXAbstractBlowfishCrypter.java https://github.com/otnappdev/wonder.git | Java | 226 lines
                    
14/**
                    
15 * ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter
                    
16 * interface that allows subclasses to override the source of the blowfish key.
                    
17 * The blowfish cipher is a two-way cipher meaning the original string that was
                    
18 * encrypted can be retrieved. The way that this version of the blowfish cipher
                    
19 * is encrypted it is safe to use as a form value.
                    
22 */
                    
23public abstract class ERXAbstractBlowfishCrypter implements ERXCrypterInterface {
                    
24	public static final Logger log = Logger.getLogger(ERXCrypto.class);
                    
75		try {
                    
76			Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
                    
77			cipher.init(mode, secretBlowfishKey());
                    
179	 * Blowfish encodes a given string using the secret key specified in the
                    
180	 * System property: <b>ERBlowfishCipherKey</b>. The blowfish cipher is a
                    
181	 * two way cipher meaning that given the secret key you can de-cipher what
                    
                
JCEStreamCipher.java https://github.com/CyanogenMod/android_external_bouncycastle.git | Java | 623 lines
                    
17import javax.crypto.BadPaddingException;
                    
18import javax.crypto.Cipher;
                    
19import javax.crypto.CipherSpi;
                    
33import org.bouncycastle.crypto.BlockCipher;
                    
34import org.bouncycastle.crypto.CipherParameters;
                    
35import org.bouncycastle.crypto.DataLengthException;
                    
38// BEGIN android-removed
                    
39// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
40// import org.bouncycastle.crypto.engines.DESEngine;
                    
                
BlowfishEngine.java https://github.com/CyanogenMod/android_external_bouncycastle.git | Java | 577 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
9/**
                    
10 * A class that provides Blowfish key encryption operations,
                    
11 * such as encoding data and generating keys.
                    
14 */
                    
15public final class BlowfishEngine
                    
16implements BlockCipher
                    
                
transport.py https://bitbucket.org/fernandosanchezjr/paramiko-keyboard-interactive.git | Python | 1246 lines
                    
51from Crypto import Random
                    
52from Crypto.Cipher import Blowfish, AES, DES3, ARC4
                    
53from Crypto.Hash import SHA, MD5
                    
201
                    
202    _preferred_ciphers = ( 'aes128-ctr', 'aes256-ctr', 'aes128-cbc', 'blowfish-cbc', 'aes256-cbc', '3des-cbc',
                    
203        'arcfour128', 'arcfour256' )
                    
211        'aes256-ctr': { 'class': AES, 'mode': AES.MODE_CTR, 'block-size': 16, 'key-size': 32 },
                    
212        'blowfish-cbc': { 'class': Blowfish, 'mode': Blowfish.MODE_CBC, 'block-size': 8, 'key-size': 16 },
                    
213        'aes128-cbc': { 'class': AES, 'mode': AES.MODE_CBC, 'block-size': 16, 'key-size': 16 },
                    
                
test.py https://github.com/jhwilbert/viewometer.git | Python | 453 lines
                    
18
                    
19from Crypto.Cipher import *
                    
20
                    
225
                    
226def TestBlockModules(args=['aes', 'arc2', 'des', 'blowfish', 'cast', 'des3',
                    
227                           'idea', 'rc5'],
                    
287    if 'blowfish' in args:
                    
288        ciph=exerciseBlockCipher('Blowfish',verbose)# Bruce Schneier's Blowfish cipher
                    
289        if (ciph!=None):
                    
290                if verbose: print '  Verifying against test suite...'
                    
291                for entry in testdata.blowfish:
                    
292                    key,plain,cipher=entry
                    
298                    if (ciphertext!=cipher):
                    
299                        die('Blowfish failed on entry '+`entry`)
                    
300                        for i in ciphertext:
                    
                
EncryptedPrivateKeyInfoTest.java https://github.com/MIPS/libcore.git | Java | 1232 lines
                    
46import javax.crypto.BadPaddingException;
                    
47import javax.crypto.Cipher;
                    
48import javax.crypto.EncryptedPrivateKeyInfo;
                    
98
                    
99            // Blowfish
                    
100            // NO OIDs for Blowfish defined (?)
                    
101            { "Blowfish", null },
                    
102            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
103            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
103            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
104            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
105            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
JCEStreamCipher.java https://github.com/MIPS/external-bouncycastle.git | Java | 604 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
8// BEGIN android-removed
                    
9// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
10// import org.bouncycastle.crypto.engines.DESEngine;
                    
27
                    
28import javax.crypto.Cipher;
                    
29import javax.crypto.NoSuchPaddingException;
                    
422    // /**
                    
423    //  * Blowfish
                    
424    //  */
                    
424    //  */
                    
425    // static public class Blowfish_CFB8
                    
426    //     extends JCEStreamCipher
                    
                
JCEBlockCipher.java https://github.com/MIPS/external-bouncycastle.git | Java | 1377 lines
                    
4import org.bouncycastle.crypto.BufferedBlockCipher;
                    
5import org.bouncycastle.crypto.CipherParameters;
                    
6import org.bouncycastle.crypto.DataLengthException;
                    
8import org.bouncycastle.crypto.engines.AESFastEngine;
                    
9import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
10// BEGIN android-removed
                    
67import javax.crypto.BadPaddingException;
                    
68import javax.crypto.Cipher;
                    
69import javax.crypto.IllegalBlockSizeException;
                    
                
BlowfishEngine.java https://github.com/MIPS/external-bouncycastle.git | Java | 576 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
8/**
                    
9 * A class that provides Blowfish key encryption operations,
                    
10 * such as encoding data and generating keys.
                    
13 */
                    
14public final class BlowfishEngine
                    
15implements BlockCipher
                    
                
transport.py https://github.com/analogue/mythbox.git | Python | 1362 lines
                    
20from Crypto import Util
                    
21from Crypto.Cipher import XOR
                    
22
                    
143                        'aes128-ctr', 'aes128-cbc', 'cast128-ctr',
                    
144                        'cast128-cbc', 'blowfish-ctr', 'blowfish-cbc',
                    
145                        '3des-ctr', '3des-cbc'] # ,'none']
                    
                
BlowFish.java https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Java | 402 lines
                    
1package ch.ethz.ssh2.crypto.cipher;
                    
2
                    
29/**
                    
30 * A class that provides Blowfish key encryption operations, such as encoding
                    
31 * data and generating keys. All the algorithms herein are from Applied
                    
36 */
                    
37public class BlowFish implements BlockCipher
                    
38{
                    
                
BlowfishEngine.java https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Java | 576 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
8/**
                    
9 * A class that provides Blowfish key encryption operations,
                    
10 * such as encoding data and generating keys.
                    
13 */
                    
14public final class BlowfishEngine
                    
15implements BlockCipher
                    
                
EncryptedPrivateKeyInfoTest.java https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Java | 1232 lines
                    
39import javax.crypto.BadPaddingException;
                    
40import javax.crypto.Cipher;
                    
41import javax.crypto.EncryptedPrivateKeyInfo;
                    
90
                    
91            // Blowfish
                    
92            // NO OIDs for Blowfish defined (?)
                    
93            { "Blowfish", null },
                    
94            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
96            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
97            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
JCEStreamCipher.java https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk | Java | 623 lines
                    
17import javax.crypto.BadPaddingException;
                    
18import javax.crypto.Cipher;
                    
19import javax.crypto.CipherSpi;
                    
33import org.bouncycastle.crypto.BlockCipher;
                    
34import org.bouncycastle.crypto.CipherParameters;
                    
35import org.bouncycastle.crypto.DataLengthException;
                    
38// BEGIN android-removed
                    
39// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
40// import org.bouncycastle.crypto.engines.DESEngine;
                    
                
BlowfishEngine.java https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk | Java | 577 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
9/**
                    
10 * A class that provides Blowfish key encryption operations,
                    
11 * such as encoding data and generating keys.
                    
14 */
                    
15public final class BlowfishEngine
                    
16implements BlockCipher
                    
                
EncryptedPrivateKeyInfoTest.java https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk | Java | 1232 lines
                    
39import javax.crypto.BadPaddingException;
                    
40import javax.crypto.Cipher;
                    
41import javax.crypto.EncryptedPrivateKeyInfo;
                    
90
                    
91            // Blowfish
                    
92            // NO OIDs for Blowfish defined (?)
                    
93            { "Blowfish", null },
                    
94            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
96            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
97            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
JCEStreamCipher.java https://gitlab.com/brian0218/rk3288_r-box_android4.4.2_sdk | Java | 623 lines
                    
17import javax.crypto.BadPaddingException;
                    
18import javax.crypto.Cipher;
                    
19import javax.crypto.CipherSpi;
                    
33import org.bouncycastle.crypto.BlockCipher;
                    
34import org.bouncycastle.crypto.CipherParameters;
                    
35import org.bouncycastle.crypto.DataLengthException;
                    
38// BEGIN android-removed
                    
39// import org.bouncycastle.crypto.engines.BlowfishEngine;
                    
40// import org.bouncycastle.crypto.engines.DESEngine;
                    
                
BlowfishEngine.java https://gitlab.com/brian0218/rk3288_r-box_android4.4.2_sdk | Java | 577 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
9/**
                    
10 * A class that provides Blowfish key encryption operations,
                    
11 * such as encoding data and generating keys.
                    
14 */
                    
15public final class BlowfishEngine
                    
16implements BlockCipher
                    
                
EncryptedPrivateKeyInfoTest.java https://gitlab.com/brian0218/rk3288_r-box_android4.4.2_sdk | Java | 1232 lines
                    
39import javax.crypto.BadPaddingException;
                    
40import javax.crypto.Cipher;
                    
41import javax.crypto.EncryptedPrivateKeyInfo;
                    
90
                    
91            // Blowfish
                    
92            // NO OIDs for Blowfish defined (?)
                    
93            { "Blowfish", null },
                    
94            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
96            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
97            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
BlowFish.java https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Java | 402 lines
                    
1package ch.ethz.ssh2.crypto.cipher;
                    
2
                    
29/**
                    
30 * A class that provides Blowfish key encryption operations, such as encoding
                    
31 * data and generating keys. All the algorithms herein are from Applied
                    
36 */
                    
37public class BlowFish implements BlockCipher
                    
38{
                    
                
BlowfishEngine.java https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Java | 576 lines
                    
3import org.bouncycastle.crypto.BlockCipher;
                    
4import org.bouncycastle.crypto.CipherParameters;
                    
5import org.bouncycastle.crypto.DataLengthException;
                    
8/**
                    
9 * A class that provides Blowfish key encryption operations,
                    
10 * such as encoding data and generating keys.
                    
13 */
                    
14public final class BlowfishEngine
                    
15implements BlockCipher
                    
                
EncryptedPrivateKeyInfoTest.java https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Java | 1232 lines
                    
39import javax.crypto.BadPaddingException;
                    
40import javax.crypto.Cipher;
                    
41import javax.crypto.EncryptedPrivateKeyInfo;
                    
90
                    
91            // Blowfish
                    
92            // NO OIDs for Blowfish defined (?)
                    
93            { "Blowfish", null },
                    
94            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
95            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
96            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
97            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
AbstractRememberMeManager.java https://github.com/apache/jsecurity.git | Java | 283 lines
                    
29import org.apache.ki.codec.Hex;
                    
30import org.apache.ki.crypto.BlowfishCipher;
                    
31import org.apache.ki.crypto.Cipher;
                    
40 * {@link #setSerializer(org.apache.ki.io.Serializer) serialization} and
                    
41 * {@link #setCipher(org.apache.ki.crypto.Cipher) encryption} of the remembered user identity.
                    
42 * <p/>
                    
58    private Serializer serializer = new DefaultSerializer();
                    
59    private Cipher cipher = new BlowfishCipher();
                    
60    private byte[] encryptionCipherKey = null;
                    
                
BlowfishEngine.java https://bitbucket.org/dabron/bitcoin-nfc.git | Java | 576 lines
                    
3import com.google.bitcoin.bouncycastle.crypto.BlockCipher;
                    
4import com.google.bitcoin.bouncycastle.crypto.CipherParameters;
                    
5import com.google.bitcoin.bouncycastle.crypto.DataLengthException;
                    
8/**
                    
9 * A class that provides Blowfish key encryption operations,
                    
10 * such as encoding data and generating keys.
                    
13 */
                    
14public final class BlowfishEngine
                    
15implements BlockCipher
                    
                
GnuCrypto.java https://bitbucket.org/Underworld79/toolchain_gcc-4.8.git | Java | 598 lines
                    
41import gnu.java.security.Registry;
                    
42import gnu.javax.crypto.cipher.CipherFactory;
                    
43import gnu.javax.crypto.mac.MacFactory;
                    
74        put("Cipher.ARCFOUR ImplementedIn", "Software");
                    
75        put("Cipher.BLOWFISH",
                    
76            gnu.javax.crypto.jce.cipher.BlowfishSpi.class.getName());
                    
76            gnu.javax.crypto.jce.cipher.BlowfishSpi.class.getName());
                    
77        put("Cipher.BLOWFISH ImplementedIn", "Software");
                    
78        put("Cipher.DES", gnu.javax.crypto.jce.cipher.DESSpi.class.getName());
                    
112            gnu.javax.crypto.jce.cipher.PBES2.HMacHaval.Anubis.class.getName());
                    
113        put("Cipher.PBEWithHMacHavalAndBlowfish",
                    
114            gnu.javax.crypto.jce.cipher.PBES2.HMacHaval.Blowfish.class.getName());
                    
133            gnu.javax.crypto.jce.cipher.PBES2.HMacMD2.Anubis.class.getName());
                    
134        put("Cipher.PBEWithHMacMD2AndBlowfish",
                    
135            gnu.javax.crypto.jce.cipher.PBES2.HMacMD2.Blowfish.class.getName());
                    
                
Blowfish.java https://bitbucket.org/Underworld79/toolchain_gcc-4.8.git | Java | 611 lines
                    
1/* Blowfish.java --
                    
2   Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
                    
43
                    
44package gnu.javax.crypto.cipher;
                    
45
                    
53/**
                    
54 * Blowfish is a 16-round, 64-bit Feistel cipher designed by Bruce Schneier. It
                    
55 * accepts a variable-length key of up to 448 bits.
                    
60 * 647--654 (1996 Bruce Schneier).</li>
                    
61 * <li><a href="http://www.counterpane.com/blowfish.html">The Blowfish
                    
62 * Encryption Algorithm.</a></li>
                    
64 */
                    
65public class Blowfish
                    
66    extends BaseCipher
                    
                
test.py https://bitbucket.org/kinkudi/palplex.git | Python | 453 lines
                    
18
                    
19from Crypto.Cipher import *
                    
20
                    
225
                    
226def TestBlockModules(args=['aes', 'arc2', 'des', 'blowfish', 'cast', 'des3',
                    
227                           'idea', 'rc5'],
                    
287    if 'blowfish' in args:
                    
288        ciph=exerciseBlockCipher('Blowfish',verbose)# Bruce Schneier's Blowfish cipher
                    
289        if (ciph!=None):
                    
290                if verbose: print '  Verifying against test suite...'
                    
291                for entry in testdata.blowfish:
                    
292                    key,plain,cipher=entry
                    
298                    if (ciphertext!=cipher):
                    
299                        die('Blowfish failed on entry '+`entry`)
                    
300                        for i in ciphertext:
                    
                
test.py https://github.com/chrisvxd/WETT.git | Python | 453 lines
                    
18
                    
19from Crypto.Cipher import *
                    
20
                    
225
                    
226def TestBlockModules(args=['aes', 'arc2', 'des', 'blowfish', 'cast', 'des3',
                    
227                           'idea', 'rc5'],
                    
287    if 'blowfish' in args:
                    
288        ciph=exerciseBlockCipher('Blowfish',verbose)# Bruce Schneier's Blowfish cipher
                    
289        if (ciph!=None):
                    
290                if verbose: print '  Verifying against test suite...'
                    
291                for entry in testdata.blowfish:
                    
292                    key,plain,cipher=entry
                    
298                    if (ciphertext!=cipher):
                    
299                        die('Blowfish failed on entry '+`entry`)
                    
300                        for i in ciphertext:
                    
                
EncryptedPrivateKeyInfoTest.java https://github.com/mkedwards/platform__libcore.git | Java | 1232 lines
                    
46import javax.crypto.BadPaddingException;
                    
47import javax.crypto.Cipher;
                    
48import javax.crypto.EncryptedPrivateKeyInfo;
                    
98
                    
99            // Blowfish
                    
100            // NO OIDs for Blowfish defined (?)
                    
101            { "Blowfish", null },
                    
102            //            {"Blowfish","Blowfish/CBC/PKCS5Padding"},
                    
103            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
103            //            {"Blowfish","Blowfish/CFB/PKCS5Padding"},
                    
104            //            {"Blowfish","Blowfish/OFB/PKCS5Padding"},
                    
105            //            {"Blowfish","Blowfish/PCBC/PKCS5Padding"},
                    
                
__init__.py https://bitbucket.org/chapmanb/galaxy-central/ | Python | 76 lines
                    
5
                    
6from Crypto.Cipher import Blowfish
                    
7from Crypto.Util.randpool import RandomPool
                    
37        self.id_secret = config['id_secret']
                    
38        self.id_cipher = Blowfish.new( self.id_secret )
                    
39
                    
                
BlowFish.java https://gitlab.com/imxieke/remote-desktop-clients | Java | 403 lines
                    
1
                    
2package com.trilead.ssh2.crypto.cipher;
                    
3
                    
30/**
                    
31 * A class that provides Blowfish key encryption operations, such as encoding
                    
32 * data and generating keys. All the algorithms herein are from Applied
                    
35 * @author See comments in the source file
                    
36 * @version $Id: BlowFish.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
                    
37 */
                    
37 */
                    
38public class BlowFish implements BlockCipher
                    
39{
                    
                
transport.py https://bitbucket.org/chrisfranklinuk/gamecology.git | Python | 1248 lines
                    
51from Crypto import Random
                    
52from Crypto.Cipher import Blowfish, AES, DES3, ARC4
                    
53from Crypto.Hash import SHA, MD5
                    
201
                    
202    _preferred_ciphers = ( 'aes128-ctr', 'aes256-ctr', 'aes128-cbc', 'blowfish-cbc', 'aes256-cbc', '3des-cbc',
                    
203        'arcfour128', 'arcfour256' )
                    
211        'aes256-ctr': { 'class': AES, 'mode': AES.MODE_CTR, 'block-size': 16, 'key-size': 32 },
                    
212        'blowfish-cbc': { 'class': Blowfish, 'mode': Blowfish.MODE_CBC, 'block-size': 8, 'key-size': 16 },
                    
213        'aes128-cbc': { 'class': AES, 'mode': AES.MODE_CBC, 'block-size': 16, 'key-size': 16 },
                    
                
test.py https://github.com/PhillyOpen/howtos.git | Python | 453 lines
                    
18
                    
19from Crypto.Cipher import *
                    
20
                    
225
                    
226def TestBlockModules(args=['aes', 'arc2', 'des', 'blowfish', 'cast', 'des3',
                    
227                           'idea', 'rc5'],
                    
287    if 'blowfish' in args:
                    
288        ciph=exerciseBlockCipher('Blowfish',verbose)# Bruce Schneier's Blowfish cipher
                    
289        if (ciph!=None):
                    
290                if verbose: print '  Verifying against test suite...'
                    
291                for entry in testdata.blowfish:
                    
292                    key,plain,cipher=entry
                    
298                    if (ciphertext!=cipher):
                    
299                        die('Blowfish failed on entry '+`entry`)
                    
300                        for i in ciphertext:
                    
                
test.py https://github.com/gperciva/git-cl.git | Python | 453 lines
                    
18
                    
19from Crypto.Cipher import *
                    
20
                    
225
                    
226def TestBlockModules(args=['aes', 'arc2', 'des', 'blowfish', 'cast', 'des3',
                    
227                           'idea', 'rc5'],
                    
287    if 'blowfish' in args:
                    
288        ciph=exerciseBlockCipher('Blowfish',verbose)# Bruce Schneier's Blowfish cipher
                    
289        if (ciph!=None):
                    
290                if verbose: print '  Verifying against test suite...'
                    
291                for entry in testdata.blowfish:
                    
292                    key,plain,cipher=entry
                    
298                    if (ciphertext!=cipher):
                    
299                        die('Blowfish failed on entry '+`entry`)
                    
300                        for i in ciphertext:
                    
                
transport.py https://gitlab.com/gupta.d.gaurav/paramiko | Python | 1251 lines
                    
66
                    
67from Crypto.Cipher import Blowfish, AES, DES3, ARC4
                    
68try:
                    
104        'aes128-cbc',
                    
105        'blowfish-cbc',
                    
106        'aes192-cbc',
                    
151        },
                    
152        'blowfish-cbc': {
                    
153            'class': Blowfish,
                    
153            'class': Blowfish,
                    
154            'mode': Blowfish.MODE_CBC,
                    
155            'block-size': 8,
                    
                
 

Source

Language