[Blowfish] Stop using ecb{Encrypt,Decrypt}Legacy stop gap call.

This commit is contained in:
Vincent Hanquez 2015-04-18 06:55:17 +01:00
parent d4213ca731
commit f686733fc6
3 changed files with 2 additions and 18 deletions

View File

@ -50,8 +50,8 @@ instance Cipher CSTR where \
}; \
instance BlockCipher CSTR where \
{ blockSize _ = 8 \
; ecbEncrypt (CSTR bf) = ecbEncryptLegacy encrypt bf \
; ecbDecrypt (CSTR bf) = ecbDecryptLegacy decrypt bf \
; ecbEncrypt (CSTR bf) = encrypt bf \
; ecbDecrypt (CSTR bf) = decrypt bf \
};
INSTANCE_CIPHER(Blowfish64, "blowfish64", 8)

View File

@ -14,8 +14,6 @@ module Crypto.Cipher.Types
Cipher(..)
, BlockCipher(..)
, BlockCipher128(..)
, ecbEncryptLegacy
, ecbDecryptLegacy
, StreamCipher(..)
, DataUnitOffset
, KeySizeSpecifier(..)

View File

@ -15,8 +15,6 @@ module Crypto.Cipher.Types.Block
-- * BlockCipher
BlockCipher(..)
, BlockCipher128(..)
, ecbEncryptLegacy
, ecbDecryptLegacy
-- * initialization vector (IV)
, IV(..)
, makeIV
@ -115,18 +113,6 @@ class Cipher cipher => BlockCipher cipher where
aeadInit :: Byteable iv => AEADMode -> cipher -> iv -> Maybe (AEAD cipher)
aeadInit _ _ _ = Nothing
ecbEncryptLegacy :: ByteArray ba
=> (cipher -> ByteString -> ByteString)
-> cipher -> ba -> ba
ecbEncryptLegacy f cipher input =
byteArrayFromBS $ f cipher (byteArrayToBS input)
ecbDecryptLegacy :: ByteArray ba
=> (cipher -> ByteString -> ByteString)
-> cipher -> ba -> ba
ecbDecryptLegacy f cipher input =
byteArrayFromBS $ f cipher (byteArrayToBS input)
-- | class of block cipher with a 128 bits block size
class BlockCipher cipher => BlockCipher128 cipher where
-- | encrypt using the XTS mode.