Comments (2)
This actually looks like good code on your part, so I'll spend some time figuring out what's wrong here. Thanks for the heads up, and I'll comment back when I publish a hotfix.
from steel_crypt.
Okay, the issue is fixed. The problem is that ECB, as a mode, is incompatible with an IV. Thus, there was an internal error with passing an IV, since I abstract AES modes together. Regardless, it's been fixed.
If you update to the latest version of steel_crypt (1.3.2+1), you will be able to run the code below:
var FortunaKey = 'qHjzUlcH02Q0zupxOSPPVQoY-LBI8Cmf4WoUNhw90B4==';
var aesEncrypter = AesCrypt(FortunaKey, 'ecb');
String encrypted = aesEncrypter.encrypt('1234567890');
print(encrypted);
However, I would be remiss if I didn't note that ECB is dangerously insecure. Because it's the only mode which doesn't take an IV, it's susceptible to key-parsing attacks, and should only ever be used with small (length < 16) blocks of data. Because of this, I'd recommend you use another mode; my personal recommendation is CFB-64.
from steel_crypt.
Related Issues (20)
- Get iv automatically HOT 6
- FormatException: Invalid character HOT 2
- Password-based AES CBC encryption? HOT 5
- SHA3 SHAKE HOT 3
- How to use AES mode ECB with ZeroPadding HOT 1
- Cannot call has pass in PBKDF2 mode HOT 4
- Investigate AES-GCM divergence, tag HOT 17
- Trying to encryption/decryption data using NodeJs Fails HOT 13
- RegistryFactoryException: No algorithm registered of type BlockCipher with name: AES/OFB HOT 7
- RegistryFactoryException when calling HashCrypt(algo: HashAlgo.Sha3_256).hash(inp: username) HOT 6
- Flutter web build fails when including any version of steel crypt. HOT 8
- 'SecureRandom' is imported from both 'package:encrypt/encrypt.dart' and 'package:pointycastle/api.dart'.
- encrypt and decrypt data between python crypto package and dart steel_crypt HOT 1
- AES-256-GCM HOT 3
- Publish package HOT 1
- Null safety HOT 5
- It's "insecure" HOT 1
- Wrong password for decryption raises FormatException (Clarification) HOT 2
- Speed
- Does this package allows AES-GCM or ChaCha20Poly1305 streaming? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steel_crypt.