otp_crypto 0.1.3
otp_crypto: ^0.1.3 copied to clipboard
Time-windowed IV (OTP-like) symmetric crypto for Dart. AES-256-CBC + HMAC-SHA256 (Encrypt-then-MAC), HKDF-SHA256 key derivation, wire model for headers/body only (no HTTP). Interops with a PHP server.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add otp_crypto
With Flutter:
$ flutter pub add otp_crypto
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
otp_crypto: ^0.1.3
Alternatively, your editor might support dart pub get
or flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:otp_crypto/http/api_client.dart';
import 'package:otp_crypto/models/secure_message.dart';
import 'package:otp_crypto/otp_crypto/decryptor.dart';
import 'package:otp_crypto/otp_crypto/encryptor.dart';
import 'package:otp_crypto/otp_crypto/errors.dart';
import 'package:otp_crypto/otp_crypto/hkdf.dart';
import 'package:otp_crypto/otp_crypto/iv_deriver.dart';
import 'package:otp_crypto/otp_crypto/otp_cipher.dart';
import 'package:otp_crypto/otp_crypto/otp_crypto_config.dart';
import 'package:otp_crypto/otp_crypto/rand_nonce.dart';
import 'package:otp_crypto/otp_crypto/sha256_hmac.dart';
import 'package:otp_crypto/otp_crypto/tag_deriver.dart';
import 'package:otp_crypto/otp_crypto/time_provider.dart';
import 'package:otp_crypto/otp_crypto/utils.dart';