Wrap an openssl symmetric (aes) key. This can be used with the
functions encrypt_data() and
decrypt_data(), along with the higher level wrappers
encrypt() and decrypt(). With a symmetric
key, everybody uses the same key for encryption and decryption.
Examples
# Create a new key
key <- cyphr::key_openssl(openssl::aes_keygen())
key
#> <cyphr_key: openssl>
# With this key encrypt a string
secret <- cyphr::encrypt_string("my secret string", key)
# And decrypt it again:
cyphr::decrypt_string(secret, key)
#> [1] "my secret string"
