Description Usage Arguments Details Examples
Get and set the key for encryption and decryption
1 2 3 4 5 6 7 | sodium_set_key(key)
sodium_get_key()
sodium_get_key_or_ask()
cache_sodium_key(key = NULL)
|
key |
string for encryption key |
sodium_set_key()
sets the encryption key to key
. It is stored as an option:
'cache.sodium.key'
sodium_get_key()
retrieves the key. It returns NULL if no key has been set.
sodium_get_key_or_ask()
retrieves the key. If no key has been set and the
session is interactive, the user is prompted for the key.
cache_sodium_key()
can be used to set the sodium key if key
is provided.
Otherwise it is retrieved. This matches the cache-style accessors.
1 2 3 4 5 6 7 8 9 10 | sodium_set_key('xyzzy')
sodium_get_key()
sodium_set_key(NULL)
sodium_get_key()
## Not run:
sodium_get_key_or_ask()
sodium_get_key()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.