Copyright | (c) 2024 Auth Global |
---|---|
License | Apache2 |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- newtype HashString = HashString {}
- base16EncodeLength :: Int -> Int
- base16DecodeLength :: Int -> Maybe Int
- c_const_memcmp_ba :: ByteArray# -> ByteArray# -> CSize -> CInt
- c_hexDecode_ba :: MutableByteArray# RealWorld -> ByteArray# -> CSize -> IO CInt
- c_hexDecode_mba_bs :: MutableByteArray# RealWorld -> CString -> CSize -> IO CInt
- c_hexEncode_ba :: MutableByteArray# RealWorld -> ByteArray# -> CSize -> IO ()
- c_hexEncode_bs_ba :: Ptr Word8 -> ByteArray# -> CSize -> IO ()
- c_xorleft_ba :: ByteArray# -> CSize -> ByteArray# -> CSize -> MutableByteArray# RealWorld -> IO ()
- c_xormin_ba :: ByteArray# -> ByteArray# -> CSize -> MutableByteArray# RealWorld -> IO ()
- c_xormax_ba :: ByteArray# -> CSize -> ByteArray# -> CSize -> MutableByteArray# RealWorld -> IO ()
Documentation
newtype HashString Source #
Type intended to represent short-ish cryptographic values, say up to 128 bytes or so. Supports constant-time comparisons (i.e. run time depends on length of the inputs but is otherwise independent of content), as well as constant-time base16 and base64 conversions.
Instances
base16EncodeLength :: Int -> Int Source #
c_const_memcmp_ba :: ByteArray# -> ByteArray# -> CSize -> CInt Source #
c_hexDecode_ba :: MutableByteArray# RealWorld -> ByteArray# -> CSize -> IO CInt Source #
c_hexDecode_mba_bs :: MutableByteArray# RealWorld -> CString -> CSize -> IO CInt Source #
c_hexEncode_ba :: MutableByteArray# RealWorld -> ByteArray# -> CSize -> IO () Source #
c_hexEncode_bs_ba :: Ptr Word8 -> ByteArray# -> CSize -> IO () Source #
c_xorleft_ba :: ByteArray# -> CSize -> ByteArray# -> CSize -> MutableByteArray# RealWorld -> IO () Source #
c_xormin_ba :: ByteArray# -> ByteArray# -> CSize -> MutableByteArray# RealWorld -> IO () Source #
c_xormax_ba :: ByteArray# -> CSize -> ByteArray# -> CSize -> MutableByteArray# RealWorld -> IO () Source #