safer (version 0.1.0)

decrypt_object: Decrypt an encrypted R object

Description

encrypt_object encrypts a R object as a raw object or a string and decrypt_object decrypts a raw object or a string(encrypted by encrypt_object)

Usage

decrypt_object(encryptedObject, key = "pass", method = "symmetric")

Arguments

encryptedObject

A raw object or a string to be decrypted

key

A string without embbeded NULL. Default is 'pass'.

method

Currently, a stub. It should be 'symmetric'(default)

Value

A R object

Examples

Run this code
# NOT RUN {
temp <- encrypt_object(1:3)
all(
  is.raw(temp)
  , decrypt_object(temp) == 1:3)

temp <- encrypt_object(iris, ascii = TRUE)
all(
  is.character(temp)
  , decrypt_object(temp) == iris
  , identical(decrypt_object(temp), iris))
rm(temp)

# }

Run the code above in your browser using DataLab