cipher-aes128-0.4: AES128 using AES-NI when available.

Safe HaskellNone

Crypto.Cipher.AES128.Internal

Documentation

data AESKey Source

Constructors

AESKey 

Fields

rawKey :: !RawKey
 
expandedKey :: ForeignPtr AESKeyStruct
 

data RawKey Source

Constructors

RKey 

Fields

lowK :: !Word64
 
highK :: !Word64
 

generateKeySource

Arguments

:: Ptr Word64

Buffer of 16 bytes of key material

-> IO AESKey 

encryptECBSource

Arguments

:: AESKey

The key

-> Ptr Word8

The result buffer

-> Ptr Word8

The source buffer

-> Int

The input size in blocks

-> IO () 

decryptECBSource

Arguments

:: AESKey

The key

-> Ptr Word8

The result buffer

-> Ptr Word8

The source buffer

-> Int

The input size in blocks

-> IO () 

encryptCTRSource

Arguments

:: AESKey 
-> Ptr Word8

IV

-> Ptr Word8

NEW IV

-> Ptr Word8

CT

-> Ptr Word8

PT

-> Int

Length in bytes

-> IO () 

decryptCTRSource

Arguments

:: AESKey 
-> Ptr Word8

IV

-> Ptr Word8

NEW IV

-> Ptr Word8

CT

-> Ptr Word8

PT

-> Int

Length in bytes

-> IO ()