This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
(This covers different types of hashing, a list of available hashes can be found at the end)
I was looking for support on how to simply change one column from my input data to SHA-256 Encryption. i couldn't really find any support, or articles that could help, That were what i was looking for. something simple yet really helpful. i went from using the HMAC Tool (But this never set the hash to Hex, and always asks for a key), i understand there is the omnibus package, but to download this from a blog isn't always secure. so in the best interest of security. i had to work out a way around this.
i worked out how to do this but took me some time, so to save someone some time in the future. (with GDPR regulations and internet security increasing)
This is how i added the cryptographic hash to my Work flow.
Use the SHA256 Hashing Algorithm for Customer Detail Data.
Essentially, Change your data to a SHA256 hash and match the target requirement.
# R uses CRAN Packages
# A list of these can be found
# Set R to use the OpenSSL Library
# Grab the Data from Alteryx
df <- read.Alteryx("#1", mode="data.frame")
# Loop data from Alteryx, ensuring that the loop selects each row
for (row in 1:nrow(df))
# This function uses OpenSSL to Encrypt Your text
# More information can be found here
# information about the package can be found here
f<- function(x, output)
a <- sha256(x)
output <- print(a)
#This sets how you would like to output your data onto the tool.
# i chose dataframe, as this can be renamed easily
# but you can choose list (however this puts first record as Header)
output <- as.data.frame(apply(df,1,f,output = 'outputfile'))
#This then writes your output to the R tool on your workflow.
# setting TRUE, gives the Row a name. In this case i have used as a record ID
In the output you will see the results These will match the requirements.