Skip to content

Instantly share code, notes, and snippets.

View Alii-isk's full-sized avatar

alii-Isk Alii-isk

  • Morocco
View GitHub Profile
@Alii-isk
Alii-isk / cryptojs_aes_encryption_helper.dart
Created February 1, 2023 23:51 — forked from suehok/cryptojs_aes_encryption_helper.dart
Cryptojs aes password encryption helper for dart
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';
import 'package:crypto/crypto.dart';
import 'package:tuple/tuple.dart';
import 'package:encrypt/encrypt.dart' as encrypt;
String encryptAESCryptoJS(String plainText, String passphrase) {
try {
final salt = genRandomWithNonZero(8);