Skip to main content

sinew_security 1.0.0 copy "sinew_security: ^1.0.0" to clipboard
sinew_security: ^1.0.0 copied to clipboard

FieldCipher and BiometricVault on vetted crypto per platform.

example/README.md

sinew_security example #

A complete app that uses this package, with every platform runner, is the repository's example: a paged list of orders through Sinew's pager, its Riverpod mixins and Camouflage's CamoPagedList.

Usage #

final cipher = await FieldCipher.create();
final sealed = await cipher.encrypt('Alice', context: 'customer:42');
final plain = await cipher.decrypt(sealed, context: 'customer:42');

A value decrypted with another context fails with DecryptionFailed, so a value copied to another field doesn't decrypt.

final vault = BiometricVault.create();
if (await vault.availability() == BiometricAvailability.available) {
  await vault.store(refreshToken, reason: 'Sign in with biometrics next time');
}
final unlocked = await vault.unlock(reason: 'Sign in');