key_openssl

0th

Percentile

Symmetric encryption with openssl

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.

Usage
key_openssl(key, mode = "cbc")
Arguments
key

An openssl aes key (i.e., an object of class aes).

mode

The encryption mode to use. Options are cbc, ctr and gcm (see the openssl package for more details)

Aliases
  • key_openssl
Examples
# NOT RUN {
# Create a new key
key <- cyphr::key_openssl(openssl::aes_keygen())
key

# With this key encrypt a string
secret <- cyphr::encrypt_string("my secret string", key)
# And decrypt it again:
cyphr::decrypt_string(secret, key)
# }
Documentation reproduced from package cyphr, version 1.0.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.