nayzo / NzoUrlEncryptorBundle

Symfony Bundle used to Encrypt and Decrypt data and variables in the Web application
MIT License
89 stars 19 forks source link

Decrypt a word crypted in 3.1 don't work #30

Closed speeeeeed2006 closed 6 years ago

speeeeeed2006 commented 6 years ago

I crypted a word in 3.1 and I update to 4.0 to test and I can't decrypt it and when I crypt a word in 4.0 I can't decrypt it in 3.1. I made something wrong probably but I just followed the instructions. But it dosn't work. Is there maybe a configuration to use with secret_iv cipher_algorithm to have it work with the old version ? Thanks

nayzo commented 6 years ago

Make sure that you keep the same bundle configuration between the two versions and it should work.

speeeeeed2006 commented 6 years ago

it was the case I just changed in config.yml : nzo_url_encryptor: secret_key: ***** secret_key in 4.0 is it the same to secret in 3.1 ? because that I have done I just change secret to secret_key i didn't use secret_iv and cipher_algorithm but not the same result. Maybe I wasn't clear about 3.1 and 4.0 It was the version of NAYZO/NzoUrlEncryptorBundle

nayzo commented 6 years ago

If you change the secret_key value the "decryption" and the "encryption" result will change accordingly! So make sure you have the same secret_key value, otherwise you have to rollback by using the base value.

speeeeeed2006 commented 6 years ago

it was the same value but the crypt result isn't the same.

nayzo commented 6 years ago

I'm talking about all the configuration, not only the secret_key

speeeeeed2006 commented 6 years ago

I understand I just used the basic configuration by using the same secret_key since in the 3.1 version there's just one variable that named secret. So in my configuration there's only : nzo_url_encryptor: secret_key: ***** Like in the version 3.1

speeeeeed2006 commented 6 years ago

Just to know is it the variable secret_key in 4.0 the same to secret in 3.1 ? becuse if it was the case I didn't change it I just changed the name in config.yml.

nayzo commented 6 years ago

I don't know what do you mean by secret as the bundle doesn't contain this variable anyware in the configuration. It has only the secret_key variable.