Crypto.Hash.IO: exported symbols usage examples

Symbols

  • HashAlgorithm No usage example found for this symbol :( Collapse [-]
    hashMutableFinalize See 1 Occurences [+] Collapse [-]
    Found in Crypto.MAC.HMAC from the package cryptonite
    initialize secret = unsafeDoIO (doHashAlg undefined)
      where
            doHashAlg :: HashAlgorithm a => a -> IO (Context a)
            doHashAlg alg = do
                !withKey <- case B.length secret `compare` blockSize of
                                EQ -> return $ B.withByteArray secret
                                LT -> do key <- B.alloc blockSize $ \k -> do
                                            memSet k 0 blockSize
                                            B.withByteArray secret $ \s -> memCopy k s (B.length secret)
                                         return $ B.withByteArray (key :: ScrubbedBytes)
                                GT -> do
                                    -- hash the secret key
                                    ctx <- hashMutableInitWith alg
                                    hashMutableUpdate ctx secret
                                    digest <- hashMutableFinalize ctx
                                    hashMutableReset ctx
                                    -- pad it if necessary
                                    if digestSize < blockSize
                                        then do
                                            key <- B.alloc blockSize $ \k -> do
    

    hashMutableInit No usage example found for this symbol :( Collapse [-]
    hashMutableInitWith See 1 Occurences [+] Collapse [-]
    Found in Crypto.MAC.HMAC from the package cryptonite
               => key       -- ^ Secret key
               -> Context a
    initialize secret = unsafeDoIO (doHashAlg undefined)
      where
            doHashAlg :: HashAlgorithm a => a -> IO (Context a)
            doHashAlg alg = do
                !withKey <- case B.length secret `compare` blockSize of
                                EQ -> return $ B.withByteArray secret
                                LT -> do key <- B.alloc blockSize $ \k -> do
                                            memSet k 0 blockSize
                                            B.withByteArray secret $ \s -> memCopy k s (B.length secret)
                                         return $ B.withByteArray (key :: ScrubbedBytes)
                                GT -> do
                                    -- hash the secret key
                                    ctx <- hashMutableInitWith alg
                                    hashMutableUpdate ctx secret
                                    digest <- hashMutableFinalize ctx
                                    hashMutableReset ctx
                                    -- pad it if necessary
                                    if digestSize < blockSize
    

    hashMutableReset See 1 Occurences [+] Collapse [-]
    Found in Crypto.MAC.HMAC from the package cryptonite
      where
            doHashAlg :: HashAlgorithm a => a -> IO (Context a)
            doHashAlg alg = do
                !withKey <- case B.length secret `compare` blockSize of
                                EQ -> return $ B.withByteArray secret
                                LT -> do key <- B.alloc blockSize $ \k -> do
                                            memSet k 0 blockSize
                                            B.withByteArray secret $ \s -> memCopy k s (B.length secret)
                                         return $ B.withByteArray (key :: ScrubbedBytes)
                                GT -> do
                                    -- hash the secret key
                                    ctx <- hashMutableInitWith alg
                                    hashMutableUpdate ctx secret
                                    digest <- hashMutableFinalize ctx
                                    hashMutableReset ctx
                                    -- pad it if necessary
                                    if digestSize < blockSize
                                        then do
                                            key <- B.alloc blockSize $ \k -> do
                                                memSet k 0 blockSize
    

    hashMutableUpdate See 1 Occurences [+] Collapse [-]
    Found in Crypto.MAC.HMAC from the package cryptonite
               -> Context a
    initialize secret = unsafeDoIO (doHashAlg undefined)
      where
            doHashAlg :: HashAlgorithm a => a -> IO (Context a)
            doHashAlg alg = do
                !withKey <- case B.length secret `compare` blockSize of
                                EQ -> return $ B.withByteArray secret
                                LT -> do key <- B.alloc blockSize $ \k -> do
                                            memSet k 0 blockSize
                                            B.withByteArray secret $ \s -> memCopy k s (B.length secret)
                                         return $ B.withByteArray (key :: ScrubbedBytes)
                                GT -> do
                                    -- hash the secret key
                                    ctx <- hashMutableInitWith alg
                                    hashMutableUpdate ctx secret
                                    digest <- hashMutableFinalize ctx
                                    hashMutableReset ctx
                                    -- pad it if necessary
                                    if digestSize < blockSize
                                        then do
    

    MutableContext No usage example found for this symbol :( Collapse [-]