aboutsummaryrefslogtreecommitdiff
path: root/src/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Types.hs')
-rw-r--r--src/Types.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Types.hs b/src/Types.hs
index a625c3e..6b430c2 100644
--- a/src/Types.hs
+++ b/src/Types.hs
@@ -13,16 +13,20 @@
-- the License.
module Types
- ( Salt(Salt)
+ ( Salt(Salt), noSalt
, SecretKey(SecretKey)
) where
import Data.ByteString (ByteString)
+import qualified Data.ByteString as ByteString
-- | A salt. Equality comparisons on this type are variable-time.
newtype Salt = Salt ByteString
deriving (Eq, Ord, Show)
+noSalt :: Salt
+noSalt = Salt ByteString.empty
+
-- | A secret key used as input to a cipher or HMAC. Equality comparisons on
-- this type are variable-time.
newtype SecretKey = SecretKey ByteString