From c6c715f465e345993fd456ce6e02f923a7530f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Ch=C3=A9ron?= Date: Tue, 22 Aug 2017 20:39:29 +0200 Subject: [PATCH] Add note about Digest implementing ByteArrayAccess --- Crypto/Hash/Types.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Crypto/Hash/Types.hs b/Crypto/Hash/Types.hs index 9f088a5..ee594a1 100644 --- a/Crypto/Hash/Types.hs +++ b/Crypto/Hash/Types.hs @@ -62,6 +62,14 @@ newtype Context a = Context Bytes deriving (ByteArrayAccess,NFData) -- | Represent a digest for a given hash algorithm. +-- +-- This type is an instance of 'ByteArrayAccess' from package +-- . +-- Module "Data.ByteArray" provides many primitives to work with those values +-- including conversion to other types. +-- +-- Creating a digest from a bytearray is also possible with function +-- 'Crypto.Hash.digestFromByteString'. newtype Digest a = Digest (F.UArray Word8) deriving (Eq,Ord,ByteArrayAccess)