cryptography_ohos

Makes 'package:cryptography' use platform APIs in Ohos.

Getting Started

In pubspec.yaml:

dependencies:
  cryptography: ^2.5.0
  cryptography_ohos: ^1.0.0

Behavior by algorithm

AES-GCM

FlutterAesGcm is used in Ohos.

NIST ECDH / ECDSA

FlutterEcdh and FlutterEcdsa are available for Ohos.

HMAC

FlutterHmac is available for Ohos.

PBKDF2

FlutterPbkdf2 is available for Ohos.

Platform Implementation

Please note that this table represents the functions implemented in this repository.

Function Android Ohos
encrypt(AES+GCM) :white_check_mark: :white_check_mark:
decrypt(AES+GCM) :white_check_mark: :white_check_mark:
AES+CBC加解密 :white_check_mark: :white_check_mark:
AES+CTR加解密 :white_check_mark: :white_check_mark:
HMAC 哈希算法 :white_check_mark: :white_check_mark:
PBKDF2密钥派生 :white_check_mark: :white_check_mark:
ECDSA签名验签 :white_check_mark: :white_check_mark:
ECDH密钥协商 :white_check_mark: :white_check_mark:
Chacha20.poly1305Aead :white_check_mark: :x:
Xchacha20.poly1305Aead :white_check_mark: :x:
X25519密钥协商 :x: :x:
ED25519签名验签 :x: :x:

Libraries

cryptography_ohos
An optimized version of package:cryptography.