secure-memory 0.0.0.1 → 0.0.0.2
raw patch · 2 files changed
+17/−15 lines, 2 filesdep ~basedep ~memoryPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, memory
API changes (from Hackage documentation)
Files
lib/Data/SensitiveBytes/Internal.hs view
@@ -113,12 +113,14 @@ :: forall s m. (MonadIO m, WithSecureMemory) => Int -- ^ Size of the array (in bytes). -> m (SensitiveBytes s)-allocate size = requiringSecureMemory . liftIO $ do- res <- sodium_malloc (fromIntegral size)- if res == nullPtr then- throwIO SodiumMallocFailed- else- pure $ SensitiveBytes size size res+allocate size = requiringSecureMemory (liftIO act)+ where+ act = do+ res <- sodium_malloc (fromIntegral size)+ if res == nullPtr then+ throwIO SodiumMallocFailed+ else+ pure $ SensitiveBytes size size res -- | Free bytes previously allocated in a protected memory region. free
secure-memory.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: secure-memory-version: 0.0.0.1+version: 0.0.0.2 synopsis: Securely allocated and deallocated memory. description: Securely allocated and deallocated memory. .@@ -69,10 +69,10 @@ c-sources: ./cbits/readline_max.c build-depends:- base >=4.10 && <4.15+ base >=4.10 && <4.16 , bytestring >=0.9 && <0.11 , libsodium >=1.0.18.2- , memory >=0.14.15 && <0.16+ , memory >=0.14.15 && <0.17 , reflection >=1.2.0.1 && <2.2 , safe-exceptions ==0.1.* , text >=0.7 && <1.3@@ -103,10 +103,10 @@ TypeApplications ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints build-depends:- base >=4.10 && <4.15+ base >=4.10 && <4.16 , bytestring >=0.9 && <0.11 , libsodium >=1.0.11 && <2- , memory >=0.14.15 && <0.16+ , memory >=0.14.15 && <0.17 , safe-exceptions ==0.1.* , secure-memory default-language: Haskell2010@@ -139,11 +139,11 @@ build-depends: HUnit , async- , base >=4.10 && <4.15+ , base >=4.10 && <4.16 , bytestring >=0.9 && <0.11 , hedgehog , libsodium >=1.0.11 && <2- , memory >=0.14.15 && <0.16+ , memory >=0.14.15 && <0.17 , safe-exceptions ==0.1.* , secure-memory , tasty@@ -181,10 +181,10 @@ tasty-discover:tasty-discover build-depends: HUnit- , base >=4.10 && <4.15+ , base >=4.10 && <4.16 , bytestring >=0.9 && <0.11 , libsodium >=1.0.11 && <2- , memory >=0.14.15 && <0.16+ , memory >=0.14.15 && <0.17 , safe-exceptions ==0.1.* , secure-memory , tasty