You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var key = encrypt.Key.fromUtf8(aesKey);
var iv = encrypt.IV.fromLength(16);
final encrypter = encrypt.Encrypter(encrypt.AES(key, padding:null));
final code = encrypter
.encrypt(myString, iv: iv)
.base64;
I notice that regularly, a code will be generated with a space in it, eg MjvmDDtmCLTg AxL1GrBVK4Ns1vKtm/qtwARv5fyWBPHWg==
In that case, the following code breaks:
encrypt.Encrypted.fromBase64(code)
traceback
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following FormatException was thrown building Builder(dirty):
Invalid character (at character 13)
MjvmDDtmCLTg AxL1GrBVK4Ns1vKtm/qtwARv5fyWBPHWg==
^
What is the proper resolution in this case ?
The text was updated successfully, but these errors were encountered:
@leocavalcante hi Leo, this error occurs quite frequently for me, so I'm assuming this is not a library bug but something I did wrong ? Do you have any idea what could cause this "Invalid character" error and how I could resolve it ?
Generating keys as follow
I notice that regularly, a code will be generated with a space in it, eg
MjvmDDtmCLTg AxL1GrBVK4Ns1vKtm/qtwARv5fyWBPHWg==
In that case, the following code breaks:
traceback
What is the proper resolution in this case ?
The text was updated successfully, but these errors were encountered: