add_encrypt | R Documentation |
add_encrypt()
adds an encryption step to a transformation pipeline.
When ran as a transformation, each specified variable undergoes replacement
via an encryption hashing function depending on the hash_key
and seed
set.
add_encrypt(object, ..., hash_key = "", seed = NA)
object |
Either a |
... |
variables to be transformed. |
hash_key |
a random alphanumeric key to control encryption |
seed |
a random alphanumeric to concat to the value being encrypted |
A 'DeidentList' representing the untrained transformation pipeline. The object contains fields:
deident_methods
a list of each step in the pipeline (consisting of variables
and method
)
and methods:
mutate
apply the pipeline to a new data set
to_yaml
serialize the pipeline to a '.yml' file
# Basic usage; without setting a `hash_key` or `seed` encryption is poor.
pipe.encrypt <- add_encrypt(ShiftsWorked, Employee)
pipe.encrypt$mutate(ShiftsWorked)
# Once set the encryption is more secure assuming `hash_key` and `seed` are
# not exposed.
pipe.encrypt.secure <- add_encrypt(ShiftsWorked, Employee, hash_key="hash1", seed="Seed2")
pipe.encrypt.secure$mutate(ShiftsWorked)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.