sodium 3.4.6
sodium: ^3.4.6 copied to clipboard
Dart bindings for libsodium, for the Dart-VM and for the Web
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
3.4.5 - 2025-03-16 #
Changed #
- Updated dependencies
- Including freezed 3.0
- Updated min required dart SDK to 3.7.0
3.4.3 - 2024-11-26 #
3.4.2 - 2024-11-20 #
3.4.1 - 2024-11-07 #
Changed #
- Improved performance by removing unnecessary byte array copies for output data
- Updated dependencies
3.3.0 - 2024-09-20 #
3.2.0 - 2024-08-18 #
Added #
- Added
crypto.secretStream.pushChunkedandcrypto.secretStream.pullChunked- Serve as a replacement for the deprecated
pushandpullAPIs - Allow for a secure and bug-free encryption of files and other binary streams
by requiring a
chunkSizethat is used to partition the incoming binary data into fix-sized chunks, just as the API expects.
- Serve as a replacement for the deprecated
- Added file encryption/decryption example
Deprecated #
- Deprecated
crypto.secretStream.pushandcrypto.secretStream.pull- These methods where error prone and hard to use, as the API assumes that
the stream events are pre-chunked and "separate" from each other, while
Stream<List<int>>in dart typically means an "arbitrary binary stream" - Use
pushChunkedandpullChunkedas replacement - Related: #114, #52, #26
- These methods where error prone and hard to use, as the API assumes that
the stream events are pre-chunked and "separate" from each other, while
3.1.0 - 2024-08-15 #
Fixed #
- Added override for SodiumSumo.runIsolated that passes a SodiumSumo instance to the callback (#116)
3.0.0 - 2024-07-26 #
Changed #
- Updated min required dart SDK to 3.4.0
- Updated dependencies
- Updated expected libsodium version 1.0.20
- [BREAKING] Use
BigIntforcrypto.kdf.deriveFromKeyssubKeyId- This ensure that 64bit integers can be used safely in the VM and JS
- Refactor JS implementation to use the new
dart:js\_interopandpackage:weblibraries- This ensures compatibility with WASM and modern dart/flutter
- Seal all data types
Removed #
- [BREAKING] Removed deprecations
- Removed
pwhashandaeadfrom the non-sumo API- They still exist in the sumo API
- Removed old
SodiumInit.init*methods- The
SodiumInit.init*2methods have been renamed to remove the2
- The
- Removed
2.3.1 - 2024-03-12 #
2.3.0 - 2023-09-23 #
Changed #
- Update supported libsodium version to 1.0.19
- The library will still work with older versions, but it is recommended to upgrade your binaries to 1.0.19
- Any modifications to the API in future versions may not be compatible with older versions of libsodium
- Update dependencies
- Update tooling for building libsodium in the CI
2.2.0 - 2023-09-12 #
Added #
- Add implementation for
crypto_aead_chacha20poly1305assodium.crypto.aeadChaCha20Poly1305. (#61)
Changed #
sodium.crypto.aeadhas been renamed tosodium.crypto.aeadXChaCha20Poly1305IETF. The implementation has not changed, only the name of the getter. (#61)
Deprecated #
sodium.crypto.aeadwas renamed and thus deprecated. Usesodium.crypto.aeadXChaCha20Poly1305IETFinstead. (#61)
2.1.2 - 2023-09-06 #
Changed #
- Update min required dart SDK to 3.1.0
- Update dependencies
- Update formatting
2.1.1 - 2023-06-06 #
2.1.0 - 2023-03-08 #
Added #
SodiumInit.init2andSodiumSumoInit.init2- these methods replace the now deprecated.initmethods (#24)- This change was made to support the new
Sodium.runIsolatedAPIs - The new variants take callbacks instead of the already resolved binaries
- Your implementation should move the logic to load said binaries into these callbacks to allow the use of isolates.
- Check the README, the example and the documentation for more details
- This change was made to support the new
KeyPair.copyandKeyPair.disposemethods to copy and dispose a key pair (#24)Sodium.runIsolatedmethod to allow execution of cryptographic operations on a separate isolate (#24)
Changed #
- Set minimum required dart SDK version to 2.19.0
- Update dependencies
Deprecated #
- The
sodium.crypto.pwhashAPI has been deprecated for non sumo variants of sodium- The
SodiumSumoAPIs still fully supportpwhash - However, the simple
SodiumAPIs do not anymore - This is due to upstream changes in
sodium.js, as there thepwhashAPIs have been mode to the sumo variant of this library. If you use the library with the newest non sumo sodium.js, trying to use thepwhashAPIs will throw an exception! - If you need the
pwhashAPIs, simply switch to using the sumo variant of the library
- The
SodiumInit.init- useSodiumInit.init2instead for support of the newSodium.runIsolatedAPIs (#24)SodiumSumoInit.init- useSodiumSumoInit.init2instead for support of the newSodium.runIsolatedAPIs (#24)
Removed #
- Removed the experimental
Sodium.secureHandle,SecureKey.fromNativeHandleandSecureKey.nativeHandleAPIs (#24)- They are not needed anymore to work around isolate limitations, as you can simply use
Sodium.runIsolatedinstead
- They are not needed anymore to work around isolate limitations, as you can simply use
2.0.1 - 2022-12-07 #
Fixed #
- Implemented temporary workaround for #22 until https://github.com/flutter/flutter/issues/116405 is fixed
2.0.0 - 2022-10-23 #
Added #
- Added new
SodiumSumoclass that extends the basic sodium APIs with advanced APIs.- Important: On some platforms this requires you to use a different binary
- The new variant is available via the
package:sodium/sodium_sumo.dartimport and can be initialized withSodiumSumoInit.init
- Added
crypto.scalarmultas sumo interface for https://libsodium.gitbook.io/doc/advanced/scalar\_multiplication - Extended
crypto.signas sumo interface
Changed #
- Breaking: Moved the
Sign.skToSeedandSign.skToPkmethods intoSignSumo
Removed #
- Removed all previously deprecated APIs
1.2.5 - 2022-09-26 #
Fixed #
- Fixed performance issue that caused the "dart -> native" copy process of bytes to take extremely long (#19)
1.2.4 - 2022-09-13 #
Added #
- Let
GenericHashConsumerimplementSinkto allow synchronous adding of data - Let
SignatureConsumerimplementSinkto allow synchronous adding of data - Let
VerificationConsumerimplementSinkto allow synchronous adding of data
Fixed #
- Rename
JsError.wraptojsErrorWrapto prevent problems when debugging JS applications
1.2.3+1 - 2022-09-07 #
Changed #
- Update dependencies
- Set minimum required dart SDK version to 2.18.0
1.2.3 - 2022-08-18 #
Changed #
- Update dependencies
- Activate stricter linter rules, fix resulting issues
1.2.1 - 2022-05-25 #
Changed #
- Updated minimum required dart SDK to 1.17.0
- Refactor implementation to make use of newly added ABI-specific integers
- Makes the library more robust on non x64 platforms
- Future-proof if new platforms are added
1.2.0+2 - 2022-01-25 #
Changed #
- Replaced
lintwithdart_test_toolswhich makes the default rules oflinteven more strict - Refactored test setup tooling
1.2.0 - 2021-11-26 #
Added #
- Support for 32bit architectures by generalizing the native FFI bindings (#7)
Changed #
- Set minimum required dart SDK version to 2.14
- Updated dependencies
- Upgraded dart ffi language bindings
- Use new callable workflows for workflow simplification
Fixed #
- Fix formatting and linter issues with the newer dart SDK & dependencies
1.1.1 - 2021-08-26 #
1.1.0 - 2021-08-17 #
Added #
SecureKey.splitextension that allows to split one key into multiple (#2)SecureKey.nativeHandleandSecureKey.fromNativeHandleto allow passing secure keys across isolate boundariesSodiumInit.initcan now be called withinitNative: falseto disable initialization of the native library, in case it has already been initialized