Fix decryption
This commit is contained in:
parent
2518872872
commit
e5d6c550a2
@ -1,3 +1,6 @@
|
||||
# 1.3.0.0
|
||||
- Fix decryption
|
||||
|
||||
# 1.2.0.0
|
||||
- Pad plaintext before encryption, allowing encryption of payloads shorter than 128 bits
|
||||
|
||||
|
||||
@ -66,9 +66,4 @@ decrypt :: forall a m namespace.
|
||||
, Binary a
|
||||
, MonadThrow m
|
||||
) => CryptoIDKey -> CryptoUUID namespace -> m a
|
||||
decrypt = Poly.decrypt $ check . decodeOrFail . toByteString
|
||||
where
|
||||
check (Left _) = throwM DeserializationError
|
||||
check (Right (rem, _, res))
|
||||
| Lazy.ByteString.all (== 0) rem = return res
|
||||
| otherwise = throwM InvalidNamespaceDetected
|
||||
decrypt = Poly.decrypt $ return . Lazy.ByteString.toStrict . toByteString
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: uuid-crypto
|
||||
version: 1.2.0.0
|
||||
version: 1.3.0.0
|
||||
synopsis: Reversable and secure encoding of object ids as uuids
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
|
||||
Loading…
Reference in New Issue
Block a user