sodium
Dart bindings for libsodium, for the Dart-VM and for the Web
4.0.4
24K downloads/mo
#2014 most downloaded on pub.dev
Skycoder42/libsodium_dart_bindings
What this package is like to depend on
Last release 20 days ago
04 Aug 2026
Release timing varies
gaps range from 1 weeks to 8 months
Most releases are documented
notes for 46 of 57 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
58 releases · first in 2021
9 releases in the last 12 months
see the full history below
Release timeline
58 releases · Apr 2021 to Aug 2026Releases
latest 58-
4.0.404 Aug 2026Release notes
Open source →Changelog
4.0.4 - 2026-08-04
Changed
- Updated dependencies, including ffigen with updated generations
Fixed
- Cap the extracted source path at 218 characters on windows, leaving room for the 41 characters msbuild adds when it passes sources to
cl.exe(#193)
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Updated dependencies, including ffigen with updated generations
Fixed
- Cap the extracted source path at 218 characters on windows, leaving room for the 41 characters msbuild adds when it passes sources to
cl.exe(#193)
-
4.0.311 Jul 2026Release notes
Open source →Changelog
4.0.3 - 2026-07-11
Changed
- Updated min sdk version to ^3.12.0
- Updated dependencies
Fixed
- Link the linux native library with
-Wl,-Bsymbolic-functions- Prevents symbol collisions with other flutter plugins (#211)
- Works as hardening step to make it harder to manipulate the library
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Updated min sdk version to ^3.12.0
- Updated dependencies
Fixed
- Link the linux native library with
-Wl,-Bsymbolic-functions- Prevents symbol collisions with other flutter plugins (#211)
- Works as hardening step to make it harder to manipulate the library
-
4.0.210 Apr 2026Release notes
Open source →Changelog
4.0.2 - 2026-04-10
Fixed
- Drop
-lflag from bash invocation for make on windows (#192) - Automatically fall back to temporary directory for building when build folder contains spaces (#192)
- Update README on how to setup for cross compilation of android on windows (#192)
The package and it's documentation are available at pub.dev.
Release notes
Open source →Fixed
- Drop
-lflag from bash invocation for make on windows (#192) - Automatically fall back to temporary directory for building when build folder contains spaces (#192)
- Update README on how to setup for cross compilation of android on windows (#192)
- Drop
-
4.0.2+114 Apr 2026Release notes
Open source →Changelog
4.0.2+1 - 2026-04-14
Changed
- Updated embedded libsodium binaries
The package and it's documentation are available at pub.dev.
-
4.0.131 Mar 2026Release notes
Open source →Changelog
4.0.1 - 2026-07-11
Changed
- Updated min sdk version to ^3.12.0
- Updated min flutter version to >=3.44.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changelog
4.0.1 - 2026-03-30
Changed
- Updated embedded libsodium binaries
Fixed
- Fixed Android builds on Windows (#192)
- Instead of using the predefined wrapper scripts, which only work on unix, automake is used directly
- Requires a usable non WSL bash installation on the compiler machine
- Fixed Problem with Windows path length limitations (#193)
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Updated embedded libsodium binaries
Fixed
- Fixed Android builds on Windows (#192)
- Instead of using the predefined wrapper scripts, which only work on unix, automake is used directly
- Requires a usable non WSL bash installation on the compiler machine
- Fixed Problem with Windows path length limitations (#193)
-
4.0.1+131 Mar 2026Release notes
Open source →Changelog
4.0.1+1 - 2026-03-31
Changed
- Updated embedded libsodium binaries
Fixed
- Only build code assets when configuration is enabled
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Updated embedded libsodium binaries
Fixed
- Only build code assets when configuration is enabled
-
4.0.1+207 Apr 2026Release notes
Open source →Changelog
4.0.1+2 - 2026-04-07
Changed
- Updated embedded libsodium binaries
The package and it's documentation are available at pub.dev.
-
4.0.012 Mar 2026Release notes
Open source →Changelog
4.0.0 - 2026-03-12
Deprecated
- Thanks to the use of native assets and build hooks in the main
sodiumpackage, this library is not needed anymore
and can be removed. The mainsodiumpackage will now directly include the embedded libsodium binaries for all
platforms and handle the native integration itself.
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Introduced native assets! This comes with a number of benefits:
- The native libsodium dependencies are now built via build-hooks for all supported platforms and included in the package as assets
- This works for dart and flutter likewise
Sodiuminstances can now be passed between isolates (the limitation for keys still applies)
- Updated embedded libsodium version to 1.0.21
- Updated embedded sodium.js version to 0.8.2
- Thanks to the use of native assets and build hooks in the main
-
4.0.0+117 Mar 2026Release notes
Open source →Changelog
4.0.0+1 - 2026-03-17
Changed
- Updated embedded libsodium binaries
The package and it's documentation are available at pub.dev.
-
3.4.623 Jul 2025 -
3.4.516 Mar 2025Release notes
Open source →Changed
- Updated dependencies
- Including freezed 3.0
- Updated min required dart SDK to 3.7.0
- Updated dependencies
-
3.4.428 Dec 2024 -
3.4.326 Nov 2024Release notes
Open source →Changed
- Allow SecureKeys and KeyPairs to be disposed more then once
Fixed
- Fixed crash when Uint8Lists are returned as isolate result (#134)
- Ensure keys are diposed as early as possible on isolates
-
3.4.220 Nov 2024Release notes
Open source →Changed
- Updated dependencies
Fixed
- Fixed wrong invalid buffer offset for
signedView()andunsignedView()
-
3.4.107 Nov 2024Release notes
Open source →Changed
- Improved performance by removing unnecessary byte array copies for output data
- Updated dependencies
-
3.4.020 Oct 2024 -
3.3.020 Sep 2024Release notes
Open source →Added
- Added
crypto_sign_ed25519_pk_to_curve25519andcrypto_sign_ed25519_sk_to_curve25519sumo functions (#123)
Changed
- Updated dependencies
- Improved isolate transfers for FFI secure keys
- Add finalization to JS secure keys if forgotten to dispose
- Exposed
readyproperty onLibSodiumJS
- Added
-
3.2.018 Aug 2024Release notes
Open source →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
- Added
-
3.2.0+122 Aug 2024Release notes
Open source →Changed
- Improved documentation
- Updated dev dependencies
- Fix linter issues
-
3.1.015 Aug 2024Release notes
Open source →Fixed
- Added override for SodiumSumo.runIsolated that passes a SodiumSumo instance to the callback (#116)
-
3.0.115 Aug 2024 -
3.0.026 Jul 2024Release notes
Open source →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.112 Mar 2024Release notes
Open source →Changed
- Updated min required dart SDK to 3.3.0
- Updated dependencies
Fixed
- Fixed deprecations
-
2.3.1+112 Mar 2024 -
2.3.023 Sep 2023Release notes
Open source →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
- Update supported libsodium version to 1.0.19
-
2.3.0+103 Feb 2024 -
2.3.0+205 Feb 2024 -
2.2.012 Sep 2023Release notes
Open source →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)
- Add implementation for
-
2.1.207 Sep 2023Release notes
Open source →Changed
- Update min required dart SDK to 3.1.0
- Update dependencies
- Update formatting
-
2.1.106 Jun 2023Release notes
Open source →Changed
- Update dependencies
- Update min dart SDK to 3.0.0
Removed
- Remove non libsodium definitions from generated ffi code
-
2.1.008 Mar 2023Release notes
Open source →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.107 Dec 2022Release notes
Open source →Fixed
- Implemented temporary workaround for #22 until https://github.com/flutter/flutter/issues/116405 is fixed
-
2.0.023 Oct 2022Release notes
Open source →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
- Added new
-
2.0.0-dev.122 Oct 2022 pre-releaseNothing published for this version
-
1.2.526 Sep 2022Release notes
Open source →Fixed
- Fixed performance issue that caused the "dart -> native" copy process of bytes to take extremely long (#19)
-
1.2.413 Sep 2022Release notes
Open source →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
- Let
-
1.2.318 Aug 2022Release notes
Open source →Changed
- Update dependencies
- Activate stricter linter rules, fix resulting issues
-
1.2.3+107 Sep 2022Release notes
Open source →Changed
- Update dependencies
- Set minimum required dart SDK version to 2.18.0
-
1.2.225 May 2022 -
1.2.125 May 2022Release notes
Open source →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.026 Nov 2021Release notes
Open source →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.2.0+114 Jan 2022Release notes
Open source →Changed
- Set minimum required dart SDK version to 2.15
- Updated dependencies
-
1.2.0+225 Jan 2022Release notes
Open source →Changed
- Replaced
lintwithdart_test_toolswhich makes the default rules oflinteven more strict - Refactored test setup tooling
- Replaced
-
1.1.203 Sep 2021 -
1.1.126 Aug 2021Release notes
Open source →Changed
SodiumInit.initnow automatically handles multiple initializations and no longer requires theinitNativeparameter for consecutive invocations (#3)
Deprecated
- The
initNativeparameter ofSodiumInit.inithas been deprecated as it no longer has any effect (#3)
-
1.1.017 Aug 2021Release notes
Open source →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
-
1.0.008 Jul 2021 -
0.2.423 Jun 2021Nothing published for this version
-
0.2.323 Jun 2021Nothing published for this version
-
0.2.201 Jun 2021Nothing published for this version
-
0.2.131 May 2021Nothing published for this version
-
0.2.027 May 2021Nothing published for this version
-
0.1.527 May 2021Nothing published for this version
-
0.1.425 May 2021Nothing published for this version
-
0.1.321 May 2021Nothing published for this version
-
0.1.111 May 2021Nothing published for this version
-
0.1.009 May 2021Nothing published for this version
-
0.0.107 Apr 2021Nothing published for this version