Method Crypto.Substitution()->set_key()
- Method set_key
this_program
set_key(mapping
(string
:string
|array
(string
))key
)- Description
Sets the encryption and decryption key. The decryption key is derived from the encryption
key
by reversing the mapping. If one index maps to an array of strings, one element from the array will be chosen at random in such substitution.- Throws
An error is thrown if the encryption key can not be made reversible.