Learn R Programming

lazytrade (version 0.3.9)

decrypt_mykeys: Function that decrypt encrypted content

Description

Function that decrypt encrypted content

Usage

decrypt_mykeys(path_encrypted_content, path_private_key)

Arguments

path_encrypted_content

- path to the encrypted content of the API key

path_private_key

- path to the private RSA key, should be without password

Value

- a string with decrypted key

Details

It is possible to generate private/public key pair using R-Studio Project Options Menu. Alternatively possible to use 'openssl' R package

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
library(dplyr)
library(openssl)

# Consumer API keys
ConsumerAPIkeys <- decrypt_mykeys(path_encrypted_content = file.path(path_encrypted_keys,
                                  "ConsumerAPIkeys.enc.rds"),
                                  path_private_key = path_private_key)

# }
# NOT RUN {

# }

Run the code above in your browser using DataLab