hanssens / localstorage

LocalStorage for .NET - A simple and lightweight tool for persisting data in dotnet (core) apps.
MIT License
74 stars 17 forks source link

Error in storing when encryption is activated #41

Open Nisaba opened 2 years ago

Nisaba commented 2 years ago

Hello,

If I activate the encryption, I get this error : "The input is not a valid Base-64 string because it contains a non-Base-64 character, more than two padding characters, or an illegal character among the padding characters. "

Please see attachment.

Thank you for your help

image

Nisaba commented 2 years ago

Hello, Someone is here ? Is this project still supported ?

luisjurassic commented 1 month ago

Hi @Nisaba , I was having the same problem, the value of the salt property defined by default contains an invalid character. Use a value of type "Guid" which should work. That's what solved it for me.

Example: _localStorage = new LocalStorage(new LocalStorageConfiguration { EnableEncryption = true, EncryptionSalt = "053994f4-7f89-4280-b991-d0e3e3163922" }, "blablabla");

Nisaba commented 1 month ago

Hi @luisjurassic Thank you for the tip !