decrypt: Decrypt a data frame or tibble column using an RSA...

Description Usage Arguments Value Examples

Description

Decrypt a data frame or tibble column using an RSA public/private key

Usage

1
2
decrypt(.data, ..., private_key_path = "id_rsa", lookup_object = NULL,
  lookup_path = NULL)

Arguments

.data

A data frame or tibble.

...

The unquoted names of columns to decrypt.

private_key_path

Character. A quoted path to an RSA private key created using genkeys.

lookup_object

An unquote name of a lookup object in the current environment created using link{encrypt}.

lookup_path

Character. A quoted path to an RSA private key created using encrypt.

Value

The original dataframe or tibble with the specified columns decrypted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#' This will run:
# genkeys()
# gp_encrypt = gp %>%
#   select(-c(name, address1, address2, address3)) %>%
#   encrypt(postcode, telephone)
# gp_encrypt %>%
#   decrypt(postcode, telephone)

## Not run: 
# For CRAN and testing:
library(dplyr)
temp_dir = tempdir()
genkeys(file.path(temp_dir, "id_rsa")) # temp directory for testing only
gp_encrypt = gp %>%
  select(-c(name, address1, address2, address3)) %>%
  encrypt(postcode, telephone, public_key_path = file.path(temp_dir, "id_rsa.pub"))
  gp_encrypt %>%
  decrypt(postcode, telephone, private_key_path = file.path(temp_dir, "id_rsa"))
  
## End(Not run)

encryptr documentation built on May 2, 2019, 4:16 a.m.