leocavalcante / encrypt

🔒 A set of high-level APIs over PointyCastle for two-way cryptography.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsupported operation: Uint64 accessor not supported by dart2js.

sanjay-rb opened this issue · comments

I am seeing this error for all the encryption method I have used, I am using flutter web, please help me to fix this issue.

Please find the code which I have used:-

import 'package:encrypt/encrypt.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';

class Encryption {
  String version = '1.0';
  final Encrypter encrypter = Encrypter(AES(Key.fromBase16(dotenv.get('KEY'))));

  String encrypt(String input) {
    return encrypter.encrypt(input, iv: IV.fromBase16(dotenv.get('IV'))).base64;
  }

  String decrypt(String input) {
    return encrypter.decrypt64(input, iv: IV.fromBase16(dotenv.get('IV')));
  }
}