public Cipher getEncryptionCipher ( ) throws GeneralSecurityException { Cipher cipher = Cipher . getInstance ( "Blowfish/ECB/PKCS5Padding" ) ; cipher . init ( Cipher . ENCRYPT_MODE , new SecretKeySpec ( key , "Blowfish" ) ) ; return cipher ; }
Creates a cipher for encrypting data with the specified key .