dart_secure 0.3.0 copy "dart_secure: ^0.3.0" to clipboard
dart_secure: ^0.3.0 copied to clipboard

A new Flutter Framework that uses Dart Programming Language

Sure, I've reformatted and tidied up the Markdown content for you:

# Dart Secure Package

A Dart package that provides functionalities to enhance user authentication and data encryption in Dart applications. This package integrates multiple cybersecurity practices to secure sensitive user data and interactions. The package includes the following features:

## Features

### Biometric User Authentication

#### iOS Integration

Note that this plugin works with both Touch ID and Face ID. However, to use Face ID, you need to add the following to your Info.plist file:

```xml
<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using Face ID?</string>

Android Integration

  • The plugin will build and run on SDK 16+, but isDeviceSupported() will return false before SDK 23 (Android 6.0).

Activity Changes

local_auth requires the use of a FragmentActivity instead of an Activity. To update your application:

If you are using FlutterActivity directly, change it to FlutterFragmentActivity in your AndroidManifest.xml.

If you are using a custom activity, update your MainActivity.java or MainActivity.kt to inherit from FlutterFragmentActivity.

Permissions

Update your project's AndroidManifest.xml file to include the USE_BIOMETRIC permission:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app">
    <uses-permission android:name="android.permission.USE_BIOMETRIC"/>
</manifest>

The biometricAuth feature offers a secure way to implement biometric user authentication in your app. It supports various biometric authentication methods on the device. Example usage:

getBiometric() async {
  var authStatus = await biometricAuth();
  if (authStatus == AuthenticationStatus.successful) {
    print("Authentication successful, continue");
  } else {
    print("Authentication unsuccessful, try again");
  }
}

In-App Encryption #

The InAppEncryption feature allows you to encrypt sensitive data within your app using a specified encryption key:

String encryptedAddress = inAppEncrypt(text: "User's Address", key: "MyUsersAddress");

Hash Encryption #

The hashEncryption feature securely hashes data, useful for scenarios like password storage:

String encryptedAddress = hashEncrypt(text: "User's Address");

In-App Decryption #

The InAppDecryption feature lets you decrypt encrypted data within your app using the appropriate decryption key:

String encryptedAddress = InAppDecryption(cipher: "######################", key: "MyUsersAddress");

Getting Started #

To use this package, add dart_secure as a dependency in your pubspec.yaml file:

dependencies:
  dart_secure: ^0.3.0

Then import the necessary features in your Dart code:

import 'package:dart_secure/dart_secure.dart';

Version History #

0.1.0 #

Initial release of the Dart Secure framework that integrates multiple cybersecurity practices.

0.2.0 #

Updating the BIO documentation

0.3.0 #

Gave good examples for clarification

For more details and information about the package usage, refer to the GitHub repository.

If you encounter issues or have improvement suggestions, open an issue on GitHub.

Happy coding!

3
likes
0
points
101
downloads

Publisher

verified publishersaifalmajd.blogspot.com

Weekly Downloads

A new Flutter Framework that uses Dart Programming Language

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

encrypt, flutter, local_auth

More

Packages that depend on dart_secure