Skip to content

Instantly share code, notes, and snippets.

View Jvnjye's full-sized avatar
😀
Out sick

Jay Jvnjye

😀
Out sick
View GitHub Profile
@suehok
suehok / cryptojs_aes_encryption_helper.dart
Last active May 30, 2024 08:15
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);