raaz-0.2.0: The raaz cryptographic library.

Safe HaskellNone
LanguageHaskell2010

Raaz.Cipher.ChaCha20

Description

The Chacha20 cipher.

Synopsis

Documentation

data ChaCha20 #

The type associated with the ChaCha20 cipher.

chacha20 :: ChaCha20 #

The chacha20 stream cipher.

data KEY #

The key type.

Instances

Show KEY # 

Methods

showsPrec :: Int -> KEY -> ShowS #

show :: KEY -> String #

showList :: [KEY] -> ShowS #

IsString KEY # 

Methods

fromString :: String -> KEY #

Storable KEY # 

Methods

sizeOf :: KEY -> Int #

alignment :: KEY -> Int #

peekElemOff :: Ptr KEY -> Int -> IO KEY #

pokeElemOff :: Ptr KEY -> Int -> KEY -> IO () #

peekByteOff :: Ptr b -> Int -> IO KEY #

pokeByteOff :: Ptr b -> Int -> KEY -> IO () #

peek :: Ptr KEY -> IO KEY #

poke :: Ptr KEY -> KEY -> IO () #

EndianStore KEY # 

Methods

store :: Ptr KEY -> KEY -> IO () #

load :: Ptr KEY -> IO KEY #

adjustEndian :: Ptr KEY -> Int -> IO () #

Encodable KEY # 
RandomStorable KEY # 

Methods

fillRandomElements :: Memory mem => Int -> Ptr KEY -> RT mem () #

data IV #

The IV for the chacha20

Instances

Show IV # 

Methods

showsPrec :: Int -> IV -> ShowS #

show :: IV -> String #

showList :: [IV] -> ShowS #

IsString IV # 

Methods

fromString :: String -> IV #

Storable IV # 

Methods

sizeOf :: IV -> Int #

alignment :: IV -> Int #

peekElemOff :: Ptr IV -> Int -> IO IV #

pokeElemOff :: Ptr IV -> Int -> IV -> IO () #

peekByteOff :: Ptr b -> Int -> IO IV #

pokeByteOff :: Ptr b -> Int -> IV -> IO () #

peek :: Ptr IV -> IO IV #

poke :: Ptr IV -> IV -> IO () #

EndianStore IV # 

Methods

store :: Ptr IV -> IV -> IO () #

load :: Ptr IV -> IO IV #

adjustEndian :: Ptr IV -> Int -> IO () #

Encodable IV # 
RandomStorable IV # 

Methods

fillRandomElements :: Memory mem => Int -> Ptr IV -> RT mem () #