genkeys {encryptr}R Documentation

Create and write RSA private and public keys

Description

The first step for the encryptr workflow is to create a pair of encryption keys. This uses the openssl package. The public key is used to encrypt information and can be shared. The private key allows decryption of the encrypted information. It requires a password to be set. This password cannot be recovered if lost. If the file is lost or overwritten, any data encrypted with the public key cannot be decrypted.

Usage

genkeys(private_key_name = "id_rsa",
  public_key_name = paste0(private_key_name, ".pub"))

Arguments

private_key_name

Character string. Do not change default unless good reason.

public_key_name

Character string. Do not change default unless good reason.

Value

Two files containing the public key and encrypted private key are written to the working directory.

See Also

encrypt decrypt

Examples

# Function can be used as this:
# genkeys()

# For CRAN purposes and testing
temp_dir = tempdir()
genkeys(file.path(temp_dir, "id_rsa3"))


[Package encryptr version 0.1.3 Index]