identify_text: decrypt data using a cyphr key

Description Usage Arguments Value Examples

View source: R/decrypt_methods.R

Description

When you encrypt a field with deidentify, it is relatively secure depending on the method of encryption that you may use. However, in the case that you need to decrypt any of the fields and used encryption methods to do so, you will also be able to decrypt any of the fields back to their original form.

Usage

1
identify_text(.data, key, cols_to_decrypt)

Arguments

.data

a data frame

key

A cyphr key generated from the cyphr package

cols_to_decrypt

Specific to data.frames. Should be a character vector of the names of the columns that you would like to decrypt.

Value

either a data.frame or character vector depending on the object passed through

Examples

1
2
3
4
5
6
## Not run: 
key <- gen_aes_key()
encrypt_string <- deidentify_text("cat",key)
identical(identify_text(encrypt_string,key),"cat")

## End(Not run)

phillydao/deidentify documentation built on Feb. 4, 2021, 2:31 p.m.