Skip to contents

cg_new_token_key() makes a new random key (64 hex digits) for cg_vault(). cg_key_fingerprint() returns 16 hex digits that identify a key without revealing it; saved keyed vaults record it, so opening one with the wrong key fails. Both need the openssl package.

Usage

cg_new_token_key()

cg_key_fingerprint(key = NULL)

Arguments

key

A key as hex digits or a raw vector; NULL uses CREDGATE_TOKEN_KEY.

Value

A string.

Examples

key <- cg_new_token_key()
cg_key_fingerprint(key)
#> [1] "f953d5f36ee27ff7"