Module

Codec.Encryption.Utils

Package
purescript-des
Repository
jacereda/purescript-des

#charsBytes Source

charsBytes :: Array Char -> Array Int

Decompose an array of chars into an array of byte values.

#bytesChars Source

bytesChars :: Array Int -> Array Char

Compose an array of chars from an array of byte values.

#encryptText Source

encryptText :: Word64 -> String -> Array Word64

Encrypt a string with the given key.

#decryptText Source

decryptText :: Word64 -> Array Word64 -> String

Decrypt a string with the given key.

#textKey Source

textKey :: String -> Word64

Turn a string into a Word64 to create a key. Missing chars will be padded and excess chars discarded.

#hexKey Source

hexKey :: String -> Word64

Read a Word64 from a string, just a workaround for https://github.com/purescript/purescript/issues/2306

#chunks Source

chunks :: forall a. Int -> Array a -> Array (Array a)