-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Pure Haskell implelementation for GNU SHA512 crypt algorithm
--   
--   crypt() is the password encryption function. It is based on the Data
--   Encryption Standard algorithm with variations intended (among other
--   things) to discourage use of hardware implementations of a key search.
--   
--   This package provides a pure Haskell implementation of SHA512 crypt
--   scheme.
@package crypt-sha512
@version 0

module System.POSIX.Crypt.SHA512

-- | Pure Haskell implementation of SHA512 <tt>crypt</tt> method.
--   
--   For <tt>libc</tt> versions supporting SHA512 encryption scheme (6):
--   
--   <pre>
--   "$6$" `isPrefixOf` salt ==&gt; crypt key salt = cryptSHA512 key salt
--   </pre>
--   
--   <h3>a snippet from glibc documentation</h3>
--   
--   <tt>glibc</tt> implementations of <tt>crypt</tt> support additional
--   encryption algorithms.
--   
--   If <i>salt</i> is a character string starting with the characters
--   <tt>"$id$"</tt> followed by a string terminated by <tt>"$"</tt>:
--   
--   <pre>
--   $id$salt$encrypted
--   </pre>
--   
--   then instead of using the DES machine, id identifies the encryption
--   method used and this then determines how the rest of the password
--   string is interpreted.
--   
--   The <tt>id</tt> value <tt>6</tt> corresponds to SHA-512 method (since
--   <tt>glibc-2.17</tt>).
--   
--   If the <i>salt</i> string starts with
--   
--   <pre>
--   rounds=&lt;N&gt;$
--   </pre>
--   
--   where <i>N</i> is an unsigned decimal number the numeric value of
--   <i>N</i> is used to modify the algorithm used. For example:
--   
--   <pre>
--   $6$rounds=77777$salt$encrypted
--   </pre>
--   
--   See <a>https://www.akkadia.org/drepper/SHA-crypt.txt</a>
cryptSHA512 :: ByteString -> ByteString -> Maybe ByteString

-- | Split salt-input variant of <a>cryptSHA512</a>. Salt is encoded.
cryptSHA512' :: Maybe Int -> ByteString -> ByteString -> ByteString

-- | Raw input implementation of <a>cryptSHA512</a>.
cryptSHA512Raw :: Maybe Int -> ByteString -> ByteString -> ByteString

-- | Custom base64 encoding used by crypt SHA512 scheme.
encode64 :: ByteString -> ByteString

-- | Custom base64 encoding used by crypt SHA512 scheme. See
--   <a>encode64</a>.
encode64List :: [Word8] -> ByteString
