Inside Java code, I should decrypt a word encrypted as follows:
echo -n "secret" | openssl enc -aes-256-cbc -base64 -pass pass:password -md SHA1
I'm new to encryption, but I have found some sample how to encrypt/decrypt some AES/CBC with Java. But it requires Salt, Key and Iv. I have found that OpenSsl is deriving these values from the "password", but I don't have found how to do the same in Java in order to decrypt the encrypted value.
Does someone knows how it works ? Are the Salt, Key and/or Iv stored in the ecrypted value ? Thanks for your answers.