Answer the question
In order to leave comments, you need to log in
A few questions about the openssl_encrypt function?
Hello. I need to store API tokens in the database (for example, from Yandex.Direct, Yandex.Passport). Keeping it clean is a bad idea. Here I was advised to encrypt them. But I never encrypted anything. I read about the openssl_encrypt function. It needs a key. Where can I get the keys from? The key for each token must be different, right? Therefore, there must be many keys. It's just that you can't write them, like a salt for hashing, to the config file. Where do you get them from then?
And one more question. IV (Initialization Vector) is the same as salt, isn't it? Does it need to be written once to the config file and not generated again?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question