Skip to contents

One way hash a vector

Usage

hash(x, type = "md5", n_char = NULL)

Arguments

x

vector of numbers or characters

type

hashing algorithm to use

n_char

number of characters to return

Value

one way hashed vector of the same length

Examples

hash("This is secret stuff")
#> [1] "1522ff783e5c2944391fa1c430bc3397"
hash(c("Also handles", NA, "NA values"))
#> [1] "da6b7196b9443aa5f49a560996ff6d49" NA                                
#> [3] "362f0104ad146eb967703d6f5d7ca219"