# NOT RUN {
# symmetric case:
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)
# asymmetric case:
alice <- keypair()
bob <- keypair()
temp <- encrypt_object(1:10, alice$private_key, bob$public_key)
temp2 <- decrypt_object(temp, bob$private_key, alice$public_key)
identical(1:10, temp2)
# }
Run the code above in your browser using DataCamp Workspace