leocavalcante / encrypt

🔒 A set of high-level APIs over PointyCastle for two-way cryptography.
BSD 3-Clause "New" or "Revised" License
348 stars 141 forks source link

There is no AES GCM mode to encrypt in package #275

Open denddyprod opened 2 years ago

denddyprod commented 2 years ago

Hello,

thanks for your hard work on this package.

I have a problem with package namely I can not reproduce this code with your package.

I get the following errors:

In this line: final encrypter = Encrypter(AES(key, mode: AESMode.gcm)); this error:

There's no constant named 'gcm' in 'AESMode'

and in

final decrypted = encrypter.decrypt(
      encrypted,
      iv: iv,
      associatedData: macValue,
    );

The named parameter 'associatedData' isn't defined.

Could you help me understand that I made wrong?

Thank you very much for your support!

floki2020 commented 2 years ago

@denddyprod hey,guys! The author dont publisher the last version to the pub.dev.so u can change the pubspace.yaml to a git package.it works.