Description Usage Arguments Details Functions Examples
Use the functions hide and unhide to encrypt and decrypt data.
1 2 3 4 5 |
obj |
An object to hide using secure encryption |
pubkey |
A public key used to encrypt data with the function |
hidden_obj |
A hidden object to decrypt ('unhide') |
privatekey |
A private key that is used to decrypt data |
hide will utilize public/private key encryption functionality provided by
the package sodium.
The public key is stored locally with this package's files.
In order to decrypt the output of hide, the function unhide
will authenticate through an external deployR server. Decryption requires an interactive
environment when the user runs for the first time as credentials (username + password)
are saved locally thereafter.
hide: A function to hide (encrypt) an R object
unhide: Use to unhide a hidden (encrypted) R object
keychain: used to generate the keychain if needed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # The function keychain creates a private key,
# then uses it to generate the public key.
# Both are returned in a named list.
keys <- keychain()
keys.public <- keys$pubkey # pubkey is used for Encryption
keys.private <- keys$privkey # privkey is used for Decryption
## example of encryption
##
hiddenObj <- hide("hello world", keys.public)
hiddenObj
# unhide will decrypt and deserialize a hidden object
unhide(hiddenObj, keys.private)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.