The core of the ente's crypto library.
- Import the package
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
- Call the following inside the main function
WidgetsFlutterBinding.ensureInitialized();
initCryptoUtil();
- Just start consuming the CryptoUtil class, see usage below
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
final utf8Str = CryptoUtil.strToBin("Hello");
Use the Following command for running them from the example directory of this project.
Download and place this file in example/test_data folder with file name png-5mb-1.png
OR
Run the following commands from terminal
cd example
flutter create .
mkdir test_data
cd test_data
curl -O https://freetestdata.com/wp-content/uploads/2021/09/png-5mb-1.png
cd ../..
For this one remember to select a desktop target like macos as tests may fail on android & iOS due to clash of libsodium and on web as it is not supported
cd example
flutter test integration_test --dart-define=PWD=$(PWD)
This library is made by Ente.io developers and used in auth and photos app.
This is GPL-3.0 Licensed and wouldn't be possible without libsodium
library and the sodium
dart package.