Created
January 21, 2021 19:45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- crypto-api | |
import qualified Crypto.Classes | |
-- cryptonite | |
import qualified Crypto.Cipher.Types | |
-- Implement the crypto-api BlockCipher typeclass for all cryptonite | |
-- BlockCipher instances. | |
instance Crypto.Cipher.Types.BlockCipher cipher => Crypto.Classes.BlockCipher cipher where | |
blockSize = Crypto.Cipher.Types.blockSize (undefined :: cipher) | |
encryptBlock = Crypto.Cipher.Types.ecbEncrypt | |
decryptBlock = Crypto.Cipher.Types.ecbDecrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/exarkun/Work/haskell/tahoe-lafs-immutable-uploader/aesctr/Main.hs:49:10: error: | |
• The constraint ‘Crypto.Cipher.Types.BlockCipher cipher’ | |
is no smaller than | |
the instance head ‘Crypto.Classes.BlockCipher cipher’ | |
(Use UndecidableInstances to permit this) | |
• In the instance declaration for | |
‘Crypto.Classes.BlockCipher cipher’ | |
| | |
49 | instance Crypto.Cipher.Types.BlockCipher cipher => Crypto.Classes.BlockCipher cipher where | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment