Skip to content

Instantly share code, notes, and snippets.

@exarkun
Created January 21, 2021 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exarkun/1ea529e37ee0c4fe8c2502fe9670d190 to your computer and use it in GitHub Desktop.
Save exarkun/1ea529e37ee0c4fe8c2502fe9670d190 to your computer and use it in GitHub Desktop.
# https://hackage.haskell.org/package/cryptonite-0.27/docs/Crypto-Cipher-AES.html#t:AES128
*Lib> import Crypto.Classes (buildKey)
*Lib Crypto.Classes> import qualified Data.ByteString as B
*Lib Crypto.Classes B> import Crypto.Cipher.AES (AES128)
*Lib Crypto.Classes B Crypto.Cipher.AES> buildKey (B.replicate 16 0x00) :: Maybe AES128
<interactive>:4:1: error:
• No instance for (Crypto.Classes.BlockCipher AES128)
arising from a use of ‘buildKey’
• In the expression: buildKey (B.replicate 16 0x00) :: Maybe AES128
In an equation for ‘it’:
it = buildKey (B.replicate 16 0x00) :: Maybe AES128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment