packages feed

botan-bindings 0.0.1.0 → 0.1.0.0

raw patch · 42 files changed

+296/−226 lines, 42 filesdep ~basenew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

- Botan.Bindings.Prelude: instance Data.Data.Data a => Data.Data.Data (Botan.Bindings.Prelude.ConstPtr a)
- Botan.Bindings.Prelude: instance Foreign.Storable.Storable (Botan.Bindings.Prelude.ConstPtr a)
- Botan.Bindings.Prelude: instance GHC.Classes.Eq (Botan.Bindings.Prelude.ConstPtr a)
- Botan.Bindings.Prelude: instance GHC.Classes.Ord (Botan.Bindings.Prelude.ConstPtr a)
- Botan.Bindings.Prelude: instance GHC.Show.Show (Botan.Bindings.Prelude.ConstPtr a)
- Botan.Bindings.Prelude: newtype ConstPtr a
+ Botan.Bindings.Prelude: newtype () => ConstPtr a
- Botan.Bindings.PubKey: botan_privkey_view_der :: BotanPrivKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_privkey_view_der :: BotanPrivKey -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_privkey_view_encrypted_der :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_privkey_view_encrypted_der :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_privkey_view_encrypted_der_timed :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_privkey_view_encrypted_der_timed :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_privkey_view_encrypted_pem :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_privkey_view_encrypted_pem :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> BotanViewStrCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_privkey_view_encrypted_pem_timed :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_privkey_view_encrypted_pem_timed :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> BotanViewStrCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_privkey_view_pem :: BotanPrivKey -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_privkey_view_pem :: BotanPrivKey -> BotanViewContext ctx -> BotanViewStrCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_pubkey_view_der :: BotanPubKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_pubkey_view_der :: BotanPubKey -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_pubkey_view_ec_public_point :: BotanPubKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_pubkey_view_ec_public_point :: BotanPubKey -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt
- Botan.Bindings.PubKey: botan_pubkey_view_pem :: BotanPubKey -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey: botan_pubkey_view_pem :: BotanPubKey -> BotanViewContext ctx -> BotanViewStrCallback ctx -> IO CInt
- Botan.Bindings.PubKey.KeyAgreement: botan_pk_op_key_agreement_view_public :: BotanPrivKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.PubKey.KeyAgreement: botan_pk_op_key_agreement_view_public :: BotanPrivKey -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt
- Botan.Bindings.X509: botan_x509_cert_view_as_string :: BotanX509Cert -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
+ Botan.Bindings.X509: botan_x509_cert_view_as_string :: BotanX509Cert -> BotanViewContext ctx -> BotanViewStrCallback ctx -> IO CInt
- Botan.Bindings.X509: botan_x509_cert_view_public_key_bits :: BotanX509Cert -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
+ Botan.Bindings.X509: botan_x509_cert_view_public_key_bits :: BotanX509Cert -> BotanViewContext ctx -> BotanViewBinCallback ctx -> IO CInt

Files

CHANGELOG.md view
@@ -1,5 +1,17 @@ # Changelog -## 0.0.1 - 2024/02/05+## 0.1.0.0 -- 2025-09-17++* PATCH: update the changelog to change the release date of version 0.0.1.0 from+  2024-02-05 to 2024-02-13.+* PATCH: transfer ownership to the Haskell Foundation.+* BREAKING: Fix a few FFI bindings that have `FunPtr`s in their type where they+  should not. This is considered a breaking change because the types of the FFI+  bindings were changed as a result.+* PATCH: include a license file (with copyright info)+* PATCH: make dependency bounds on `base` tighter. Now they coincide with the+  `tested-with` versions of GHC.++## 0.0.1.0 -- 2024-02-13  Initial release.
+ LICENSE view
@@ -0,0 +1,29 @@+BSD 3-Clause License++Copyright (c) 2023-2024, Apotheca Labs+Copyright (c) 2024-2025, Haskell Foundation++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++1. Redistributions of source code must retain the above copyright notice, this+   list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright notice,+   this list of conditions and the following disclaimer in the documentation+   and/or other materials provided with the distribution.++3. Neither the name of the copyright holder nor the names of its+   contributors may be used to endorse or promote products derived from+   this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
README.md view
@@ -4,4 +4,4 @@  > Botan's goal is to be the best option for cryptography in C++ by offering the tools necessary to implement a range of practical systems, such as TLS protocol, X.509 certificates, modern AEAD ciphers, PKCS#11 and TPM hardware support, password hashing, and post quantum crypto schemes. -For more information, see the [README on Github](https://github.com/apotheca/botan)+For more information, see the [README on Github](https://github.com/haskellfoundation/botan)
botan-bindings.cabal view
@@ -1,143 +1,136 @@-cabal-version:  3.0-name:           botan-bindings-version:        0.0.1.0-license:        BSD-3-Clause-author:         Leo D.-maintainer:     leo@apotheca.io-build-type:     Simple-category:       Cryptography-synopsis:       Raw Botan bindings+cabal-version:   3.0+name:            botan-bindings+version:         0.1.0.0+synopsis:        Raw Botan bindings description:+  Welcome to botan-bindings -    Welcome to botan-bindings+  Raw bindings to the [Botan](https://botan.randombit.net/) cryptography library. -    Raw bindings to the [Botan](https://botan.randombit.net/) cryptography library.+  > Botan's goal is to be the best option for cryptography in C++ by offering the+  > tools necessary to implement a range of practical systems, such as TLS protocol,+  > X.509 certificates, modern AEAD ciphers, PKCS#11 and TPM hardware support,+  > password hashing, and post quantum crypto schemes. -    > Botan's goal is to be the best option for cryptography in C++ by offering the-    > tools necessary to implement a range of practical systems, such as TLS protocol,-    > X.509 certificates, modern AEAD ciphers, PKCS#11 and TPM hardware support,-    > password hashing, and post quantum crypto schemes.+  For more information, see the [README on Github](https://github.com/haskellfoundation/botan) -    For more information, see the [README on Github](https://github.com/apotheca/botan)+author:          Leo D.+maintainer:      joris@well-typed.com, leo@apotheca.io+license:         BSD-3-Clause+license-file:    LICENSE+copyright:+  Copyright (c) 2023-2024, Apotheca Labs+  Copyright (c) 2024-2025, Haskell Foundation +build-type:      Simple+category:        Cryptography extra-doc-files:-    README.md-    CHANGELOG.md+  CHANGELOG.md+  README.md -tested-with:-    -- GHC == 9.0.2,-    GHC == 9.2.8,-    GHC == 9.4.7,-    GHC == 9.6.3,-    GHC == 9.8.1+tested-with:     GHC ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10 || ==9.12  source-repository head-    type:     git-    location: https://github.com/apotheca/botan.git+  type:     git+  location: https://github.com/haskellfoundation/botan+  subdir:   botan-bindings +source-repository this+  type:     git+  location: https://github.com/haskellfoundation/botan+  subdir:   botan-bindings+  tag:      botan-bindings-0.1.0.0+ flag pkg-config   default:     True   manual:      False   description: Use @pkg-config(1)@ to locate foreign @botan-3@ library. --- TODO: Probably need a custom Setup.hs for building Botan's C++ / Makefile---  Would be good to tie this into the extended botan.--- SEE: https://discourse.haskell.org/t/botan-bindings-devlog/6855/129--- flag bundled-c-botan---   default:     False---   manual:      True---   description: Use the bundled botan-3 C/C++ sources.---                For GHCJS and WASM this is the default.- flag XFFI-    description: Enable experimental / upstream ffi support-    manual: True-    default: False+  description: Enable experimental / upstream ffi support+  manual:      True+  default:     False  library-    hs-source-dirs:   src-    default-language: Haskell2010-    default-extensions:-        DeriveDataTypeable-        DerivingStrategies-        GeneralizedNewtypeDeriving-        NoImplicitPrelude-        OverloadedStrings-        PatternSynonyms-        RoleAnnotations-        ScopedTypeVariables-        StandaloneKindSignatures+  hs-source-dirs:     src+  default-language:   Haskell2010+  default-extensions:+    DeriveDataTypeable+    DerivingStrategies+    GeneralizedNewtypeDeriving+    NoImplicitPrelude+    OverloadedStrings+    PatternSynonyms+    RoleAnnotations+    ScopedTypeVariables+    StandaloneKindSignatures++  exposed-modules:+    Botan.Bindings.Bcrypt+    Botan.Bindings.BlockCipher+    Botan.Bindings.Cipher+    Botan.Bindings.Error+    Botan.Bindings.FPE+    Botan.Bindings.Hash+    Botan.Bindings.HOTP+    Botan.Bindings.KDF+    Botan.Bindings.KeyWrap+    Botan.Bindings.MAC+    Botan.Bindings.MPI+    Botan.Bindings.Prelude+    Botan.Bindings.PubKey+    Botan.Bindings.PubKey.Decrypt+    Botan.Bindings.PubKey.DH+    Botan.Bindings.PubKey.DSA+    Botan.Bindings.PubKey.ECDH+    Botan.Bindings.PubKey.ECDSA+    Botan.Bindings.PubKey.Ed25519+    Botan.Bindings.PubKey.ElGamal+    Botan.Bindings.PubKey.Encrypt+    Botan.Bindings.PubKey.KeyAgreement+    Botan.Bindings.PubKey.KeyEncapsulation+    Botan.Bindings.PubKey.RSA+    Botan.Bindings.PubKey.Sign+    Botan.Bindings.PubKey.SM2+    Botan.Bindings.PubKey.Verify+    Botan.Bindings.PubKey.X25519+    Botan.Bindings.PwdHash+    Botan.Bindings.RNG+    Botan.Bindings.SRP6+    Botan.Bindings.TOTP+    Botan.Bindings.Utility+    Botan.Bindings.Version+    Botan.Bindings.View+    Botan.Bindings.X509+    Botan.Bindings.ZFEC++  other-modules:      Paths_botan_bindings+  autogen-modules:    Paths_botan_bindings+  build-depends:+    , base        >=4.16 && <4.22+    , bytestring  >=0.11 && <0.13++  includes:           botan/ffi.h++  if flag(pkg-config)+    -- NB: pkg-config is available on windows as well when using msys2+    pkgconfig-depends: botan-3 >=3.0.0++  else+    extra-libraries: botan-3++  ghc-options:        -Wall -Wno-name-shadowing++  if flag(xffi)+    -- Botan.Bindings.X509.OCSP     exposed-modules:-        Botan.Bindings.Bcrypt-        Botan.Bindings.BlockCipher-        Botan.Bindings.Cipher-        Botan.Bindings.Error-        Botan.Bindings.FPE-        Botan.Bindings.Hash-        Botan.Bindings.HOTP-        Botan.Bindings.KDF-        Botan.Bindings.KeyWrap-        Botan.Bindings.MAC-        Botan.Bindings.MPI-        Botan.Bindings.Prelude-        Botan.Bindings.PubKey-        Botan.Bindings.PubKey.Decrypt-        Botan.Bindings.PubKey.DH-        Botan.Bindings.PubKey.DSA-        Botan.Bindings.PubKey.ECDH-        Botan.Bindings.PubKey.ECDSA-        Botan.Bindings.PubKey.Ed25519-        Botan.Bindings.PubKey.ElGamal-        Botan.Bindings.PubKey.Encrypt-        Botan.Bindings.PubKey.KeyAgreement-        Botan.Bindings.PubKey.KeyEncapsulation-        Botan.Bindings.PubKey.RSA-        Botan.Bindings.PubKey.Sign-        Botan.Bindings.PubKey.SM2-        Botan.Bindings.PubKey.Verify-        Botan.Bindings.PubKey.X25519-        Botan.Bindings.PwdHash-        Botan.Bindings.RNG-        Botan.Bindings.SRP6-        Botan.Bindings.TOTP-        Botan.Bindings.Utility-        Botan.Bindings.Version-        Botan.Bindings.View-        Botan.Bindings.X509-        Botan.Bindings.ZFEC-    other-modules:-        Paths_botan_bindings-    autogen-modules:-        Paths_botan_bindings-    build-depends:-        base        >= 4 && < 5,-        bytestring  >= 0.11 && < 0.13,-    includes:-        botan/ffi.h-    -- TODO Pt2: Bundle a complete copy of the Botan C/C++ source.-    -- if flag(bundled-c-botan) || impl(ghcjs) || os(ghcjs) || arch(wasm32)-    --     c-sources:      ...-    --     cxx-sources:      ...-    --     include-dirs:   ...-    -- else-    -- TODO: Indent after bundling Botan C/C++ source.-    if flag(pkg-config)-        -- NB: pkg-config is available on windows as well when using msys2-        pkgconfig-depends: botan-3 >= 3.0.0-    else-        extra-libraries: botan-3-    -- END TODO: Indent-    -- cc-options:     -Wall-    ghc-options: -Wall -Wno-name-shadowing-    if flag(XFFI)-        exposed-modules:-            Botan.Bindings.X509.CA-            Botan.Bindings.X509.CSR-            Botan.Bindings.X509.CRL-            Botan.Bindings.X509.DN-            Botan.Bindings.X509.Extensions-            -- Botan.Bindings.X509.OCSP-            Botan.Bindings.X509.Options-            Botan.Bindings.X509.Path-            Botan.Bindings.X509.Store-        cpp-options: -DXFFI+      Botan.Bindings.X509.CA+      Botan.Bindings.X509.CRL+      Botan.Bindings.X509.CSR+      Botan.Bindings.X509.DN+      Botan.Bindings.X509.Extensions+      Botan.Bindings.X509.Options+      Botan.Bindings.X509.Path+      Botan.Bindings.X509.Store++    cpp-options:     -DXFFI
src/Botan/Bindings/Bcrypt.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Bcrypt Description : Bcrypt password hashing-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/BlockCipher.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Binding.BlockCipher Description : Raw Block Cipher (PRP) interface-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/Cipher.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Cipher Description : Symmetric cipher modes-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/Error.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Error Description : Error codes and exception handling-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/FPE.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.FPE Description : Format Preserving Encryption-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -54,7 +55,7 @@     botan_fpe_destroy         :: FinalizerPtr BotanFPEStruct -pattern BOTAN_FPE_FLAG_NONE +pattern BOTAN_FPE_FLAG_NONE     ,   BOTAN_FPE_FLAG_FE1_COMPAT_MODE     ::  (Eq a, Num a) => a 
src/Botan/Bindings/HOTP.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.HOTP Description : Hash-based one-time passwords-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -18,7 +19,7 @@ Botan implements the HOTP and TOTP schemes from RFC 4226 and 6238.  Since the range of possible OTPs is quite small, applications must-rate limit OTP authentication attempts to some small number per +rate limit OTP authentication attempts to some small number per second. Otherwise an attacker could quickly try all 1000000 6-digit OTPs in a brief amount of time. 
src/Botan/Bindings/Hash.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Hash Description : Hash Functions and Checksums-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -105,7 +106,7 @@         -> ConstPtr CChar   -- ^ __hash_name__: name of the hash function, e.g., "SHA-384"         -> Word32           -- ^ __flags__: should be 0 in current API revision, all other uses are reserved                             --   and return BOTAN_FFI_ERROR_BAD_FLAG-        -> IO CInt      +        -> IO CInt  -- | Get the name of this hash function foreign import capi safe "botan/ffi.h botan_hash_name"
src/Botan/Bindings/KDF.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.KDF Description : Key Derivation Functions (KDF)-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -46,7 +47,7 @@     ,   BOTAN_KDF_SP800_56A     ,   BOTAN_KDF_SP800_56C     :: (Eq a, IsString a) => a-    + -- NOTE: All KDFs take a HashName or HMAC(HashName) as an argument pattern BOTAN_KDF_HKDF                = "HKDF" pattern BOTAN_KDF_HKDF_EXTRACT        = "HKDF-Extract"
src/Botan/Bindings/KeyWrap.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.KeyWrap Description : Bcrypt password hashing-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/MAC.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.MAC Description : Message Authentication Codes (MAC)-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -150,4 +151,4 @@         -> Ptr CSize    -- ^ __out_maximum_keylength__: if non-NULL, will be set to maximum keylength of MAC         -> Ptr CSize    -- ^ __out_keylength_modulo__: if non-NULL will be set to byte multiple of valid keys         -> IO CInt      -- ^ 0 on success, a negative value on failure-        +
src/Botan/Bindings/MPI.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.MPI Description : Multiple Precision Integers-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}@@ -237,7 +238,7 @@         -> BotanMP -- ^ __y__         -> IO CInt --- | Return (base^exponent) % modulus +-- | Return (base^exponent) % modulus foreign import capi safe "botan/ffi.h botan_mp_powmod"     botan_mp_powmod         :: BotanMP -- ^ __result__
src/Botan/Bindings/PubKey.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.PubKey Description : Public key cryptography-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -281,7 +282,7 @@     botan_privkey_view_der         :: BotanPrivKey                         -- ^ __key__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx)    -- ^ __view__+        -> BotanViewBinCallback ctx             -- ^ __view__         -> IO CInt  -- | View the private key's PEM encoding@@ -289,7 +290,7 @@     botan_privkey_view_pem         :: BotanPrivKey                         -- ^ __key__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewStrCallback ctx)    -- ^ __view__+        -> BotanViewStrCallback ctx             -- ^ __view__         -> IO CInt  foreign import capi safe "botan/ffi.h botan_privkey_algo_name"@@ -347,7 +348,7 @@         -> ConstPtr CChar                       -- ^ __pbkdf_algo__         -> CSize                                -- ^ __pbkdf_iterations__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx)    -- ^ __view__+        -> BotanViewBinCallback ctx             -- ^ __view__         -> IO CInt  {- |@@ -364,7 +365,7 @@         -> ConstPtr CChar                       -- ^ __pbkdf_algo__         -> CSize                                -- ^ __pbkdf_runtime_msec__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx)    -- ^ __view__+        -> BotanViewBinCallback ctx             -- ^ __view__         -> IO CInt  {- |@@ -382,7 +383,7 @@         -> ConstPtr CChar                       -- ^ __pbkdf_algo__         -> CSize                                -- ^ __pbkdf_iterations__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewStrCallback ctx)    -- ^ __view__+        -> BotanViewStrCallback ctx             -- ^ __view__         -> IO CInt  {- |@@ -399,7 +400,7 @@         -> ConstPtr CChar                       -- ^ __pbkdf_algo__         -> CSize                                -- ^ __pbkdf_runtime_msec__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewStrCallback ctx)    -- ^ __view__+        -> BotanViewStrCallback ctx             -- ^ __view__         -> IO CInt  foreign import capi safe "botan/ffi.h botan_privkey_get_field"@@ -455,15 +456,15 @@     botan_pubkey_view_der         :: BotanPubKey                       -- ^ __key__         -> BotanViewContext ctx              -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx) -- ^ __view__+        -> BotanViewBinCallback ctx          -- ^ __view__         -> IO CInt-    +     -- | View the public key's PEM encoding foreign import capi safe "botan/ffi.h botan_pubkey_view_pem"     botan_pubkey_view_pem         :: BotanPubKey                       -- ^ __key__         -> BotanViewContext ctx              -- ^ __ctx__-        -> FunPtr (BotanViewStrCallback ctx) -- ^ __view__+        -> BotanViewStrCallback ctx          -- ^ __view__         -> IO CInt  foreign import capi safe "botan/ffi.h botan_pubkey_algo_name"@@ -508,5 +509,5 @@     botan_pubkey_view_ec_public_point         :: BotanPubKey                       -- ^ __key__         -> BotanViewContext ctx              -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx) -- ^ __view__+        -> BotanViewBinCallback ctx          -- ^ __view__         -> IO CInt
src/Botan/Bindings/PubKey/DH.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.DSA Description : Algorithm specific key operations: Diffie Hellman-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/DSA.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.DSA Description : Algorithm specific key operations: DSA-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/Decrypt.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Decrypt Description : Public Key Decryption-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/ECDH.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.ECDH Description : Algorithm specific key operations: ECDH-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/ECDSA.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.ECDSA Description : Algorithm specific key operations: ECDSA-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/Ed25519.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Ed25519 Description : Algorithm specific key operations: Ed25519-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/ElGamal.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.PubKey.ElGamal Description : Algorithm specific key operations: ElGamal-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}@@ -53,4 +54,4 @@         -> BotanMP             -- ^ __p__: prime order of a Z_p group         -> BotanMP             -- ^ __g__: group generator         -> BotanMP             -- ^ __x__: public key-        -> IO CInt             -- ^ 0 on success, a negative value on failure           +        -> IO CInt             -- ^ 0 on success, a negative value on failure
src/Botan/Bindings/PubKey/Encrypt.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Encrypt Description : Public Key Encryption-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/KeyAgreement.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.KeyAgreement Description : Key Agreement-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}@@ -56,7 +57,7 @@     botan_pk_op_key_agreement_view_public         :: BotanPrivKey                         -- ^ __key__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx)    -- ^ __view__+        -> BotanViewBinCallback ctx             -- ^ __view__         -> IO CInt  foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_size"
src/Botan/Bindings/PubKey/KeyEncapsulation.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.KeyEncapsulation Description : Key Encapsulation-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/RSA.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.RSA Description : Algorithm specific key operations: RSA-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/SM2.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.PubKey.SM2 Description : Algorithm specific key operations: SM2-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/Sign.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Sign Description : Signature Generation-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PubKey/Verify.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Verify Description : Signature Verification-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}@@ -17,7 +18,7 @@ , botan_pk_op_verify_create , botan_pk_op_verify_update , botan_pk_op_verify_finish-, pattern BOTAN_PUBKEY_STD_FORMAT_SIGNATURE +, pattern BOTAN_PUBKEY_STD_FORMAT_SIGNATURE , pattern BOTAN_PUBKEY_DER_FORMAT_SIGNATURE ) where 
src/Botan/Bindings/PubKey/X25519.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.X25519 Description : Algorithm specific key operations: X25519-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/PwdHash.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.PwdHash Description : Password hashing-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/RNG.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.RNG Description : Random number generators-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}@@ -44,11 +45,11 @@ rng_type has the possible values:      - "system": system RNG-    +     - "user": userspace RNG-    +     - "user-threadsafe": userspace RNG, with internal locking-    +     - "rdrand": directly read RDRAND  Set rng_type to null to let the library choose some default.
src/Botan/Bindings/SRP6.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.SRP6 Description : Secure remote password-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX 
src/Botan/Bindings/TOTP.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.TOTP Description : Time-based one time passwords-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -18,7 +19,7 @@ Botan implements the HOTP and TOTP schemes from RFC 4226 and 6238.  Since the range of possible OTPs is quite small, applications must-rate limit OTP authentication attempts to some small number per +rate limit OTP authentication attempts to some small number per second. Otherwise an attacker could quickly try all 1000000 6-digit OTPs in a brief amount of time. 
src/Botan/Bindings/Utility.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Utility Description : Utility functions-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/Version.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.Version Description : Botan version info-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}
src/Botan/Bindings/View.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.View Description : View functions-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX -}@@ -26,7 +27,7 @@     ->  ConstPtr Word8          -- ^ __data__: the binary data     ->  CSize                   -- ^ __len__: the length of data in bytes     ->  CInt-    + type BotanViewBinCallback ctx = FunPtr (BotanViewBinFn ctx)  -- NOTE: "Wrapper stubs can't be used with CApiFFI."
src/Botan/Bindings/X509.hsc view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.X509 Description : X.509 Certificates and CRLs-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX @@ -126,7 +127,7 @@     botan_x509_cert_view_public_key_bits         :: BotanX509Cert                        -- ^ __cert__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewBinCallback ctx)    -- ^ __view__+        -> BotanViewBinCallback ctx             -- ^ __view__         -> IO CInt  foreign import capi safe "botan/ffi.h botan_x509_cert_get_public_key"@@ -164,7 +165,7 @@     botan_x509_cert_view_as_string         :: BotanX509Cert                        -- ^ __cert__         -> BotanViewContext ctx                 -- ^ __ctx__-        -> FunPtr (BotanViewStrCallback ctx)    -- ^ __view__+        -> BotanViewStrCallback ctx             -- ^ __view__         -> IO CInt  pattern NO_CONSTRAINTS
src/Botan/Bindings/X509/CRL.hs view
@@ -23,7 +23,7 @@ -}  foreign import ccall unsafe botan_x509_crl_get_revoked-    :: Ptr X509CRLEntryPtr -> Ptr CSize +    :: Ptr X509CRLEntryPtr -> Ptr CSize     -> X509CRLPtr     -> IO BotanErrorCode @@ -101,7 +101,7 @@     -> X509CertPtr     -> Word32   -- Reason     -> IO BotanErrorCode-    + -- -- Certificate Revocation List Entry --
src/Botan/Bindings/X509/CSR.hs view
@@ -42,4 +42,4 @@     -> Ptr CChar     -> RNGPtr     -> IO BotanErrorCode-    +
src/Botan/Bindings/ZFEC.hs view
@@ -1,9 +1,10 @@ {-| Module      : Botan.Bindings.ZFEC Description : ZFEC Forward Error Correction-Copyright   : (c) Leo D, 2023+Copyright   : (c) 2023-2024, Apotheca Labs+              (c) 2024-2025, Haskell Foundation License     : BSD-3-Clause-Maintainer  : leo@apotheca.io+Maintainer  : joris@well-typed.com, leo@apotheca.io Stability   : experimental Portability : POSIX