anonymize: Anonymize a vector.
Description
anonymize
anonymizes a vector .x
by first salting it with
salt
and then hashing it with hash
. See
both functions for additional documentation.
Usage
anonymize(.x, .algo = "sha256", .seed = 0, .chars = letters, .n_chars = 5L, ...)
Arguments
.algo
the name of the algorithm.
.seed
an integer to seed the random number generator.
.chars
set of characters to salt with.
.n_chars
an integer; number of characters to salt with.
...
additional arguments to be based to hash
.
Value
An anonymized version of the vector.
Details
The user is advised to check out Wikipedia for more information.
Examples
Run this codeset.seed(1)
anonymize(letters)
Run the code above in your browser using DataLab