raaz-0.3.2: Fast and type safe cryptography.
Safe HaskellNone
LanguageHaskell2010

ChaCha20.CHandWritten

Description

The portable C-implementation of Blake2b.

Synopsis

Documentation

type Prim = ChaCha20 Source #

type Internals = ChaCha20Mem Source #

type BufferPtr = AlignedBlockPtr BufferAlignment Prim Source #

additionalBlocks :: BlockCount ChaCha20 Source #

c_chacha20_block :: BufferPtr -> BlockCount ChaCha20 -> Ptr (Key ChaCha20) -> Ptr (Nounce ChaCha20) -> Ptr (WordType ChaCha20) -> IO () Source #

Chacha20 block transformation.

processBlocks :: BufferPtr -> BlockCount Prim -> Internals -> IO () Source #

processLast :: BufferPtr -> BYTES Int -> Internals -> IO () Source #

Process the last bytes.

type RandomBufferSize = 16 Source #

The number of blocks of the cipher that is generated in one go encoded as a type level nat.

reseedAfter :: BlockCount Prim Source #

How many blocks of the primitive to generated before re-seeding.

randomBlocks :: BufferPtr -> BlockCount Prim -> Internals -> IO () Source #