Decrypt age-encrypted strings

Description

Decrypts strings that were encrypted with age. Can decrypt using a private key file (for key-based decryption) or with a passphrase (when no private key provided). If no private key is specified, will prompt for a passphrase interactively.

Usage

string_decrypt(input = NULL, private = NULL)

Arguments

input Character vector of age-encrypted strings to decrypt
private Character string, path to the private age key file. If NULL, will use passphrase decryption and prompt for password.

Value

Character vector of decrypted strings

Examples

library("lockbox")

# Decrypt with private key
decrypted <- string_decrypt(encrypted_strings, private = "identity.key")

# Decrypt with passphrase (will prompt)
decrypted <- string_decrypt(encrypted_strings)