saltedHash: Salted hashing function

Description Usage Arguments Value Author(s) See Also Examples

Description

This function adds salt (stochastic or deterministic) to a character of strings prior to a hashing of the complete string.

Usage

1
saltedHash(salt, x, algo = "sha256", ...)

Arguments

salt

A character containing the salt

x

A character vector of the strings to be hashed.

algo

The hashing algorithm used. See digest for possible values.

...

Additional parameters passed to digest.

Value

A character vector

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>

See Also

digest

Examples

1
2
3
x <- c("AVerySecretString", "AnotherSecretSting")
saltedHash("SomeSalt", x = x, algo = "md5")
#digest(paste0("SomeSalt", "AVerySecretString"), algo = "md5") 

AEBilgrau/Bmisc documentation built on May 5, 2019, 11:28 a.m.