method
key=
v2_4_6 -
Show latest stable
- Class:
OpenSSL::Cipher
key=(p1)public
Sets the cipher key. To generate a key, you should either use a secure random byte string or, if the key is to be derived from a password, you should rely on PBKDF2 functionality provided by OpenSSL::PKCS5. To generate a secure random-based key, Cipher#random_key may be used.
Only call this method after calling Cipher#encrypt or Cipher#decrypt.