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

outdated

Android and iOS devices to allow Local Authentication + Cryptography via Biometric.

local_auth_crypto #

pub package

Android and iOS devices to allow Local Authentication + Cryptography via Biometric.

[Screenshot]

Features #

New instance

final localAuthCrypto = LocalAuthCrypto.instance;

Encrypt

await localAuthCrypto.encrypt(message);

PromptInfo #

BiometricPromptInfo(
  title: 'BIOMETRIC',
  subtitle: 'Please scan biometric to decrypt',
  negativeButton: 'CANCEL',
);

Decrypt #

await localAuthCrypto.authenticate(promptInfo, cipherText);

Getting started #

It is really easy to use! You should ensure that you add the local_auth_crypto as a dependency in your flutter project.

local_auth_crypto: "^1.0.0"

Usage #

Flutter #

  • Encrypt
final localAuthCrypto = localAuthCrypto.instance;

final message = 'TOKEN';
final cipherText = await localAuthCrypto.encrypt(message);
  • Decrypt
final localAuthCrypto = localAuthCrypto.instance;

final promptInfo = BiometricPromptInfo(
  title: 'BIOMETRIC',
  subtitle: 'Please scan biometric to decrypt',
  negativeButton: 'CANCEL',
);
final plainText = await localAuthCrypto.authenticate(promptInfo, cipherText);

Android #

  • Update code in MainActivity.kt file
import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity : FlutterFragmentActivity()
  • Add use-permissions in AndroidManifest.xml file
<uses-permission android:name="android.permission.USE_BIOMETRIC" />

iOS #

  • Add privacy in info.plist file
<dict>
  <key>NSFaceIDUsageDescription</key>
  <string>This application wants to access your TouchID or FaceID</string>
</dict>
5
likes
0
points
184
downloads

Publisher

verified publisherwachasit.com

Weekly Downloads

Android and iOS devices to allow Local Authentication + Cryptography via Biometric.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on local_auth_crypto