secret: Create a 'secret'

Description Usage Arguments Details Value

View source: R/class-secret.R

Description

secrets are character vectors that print with the specified secrets hidden by asterisks (***).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
secret(x = character(), secrets = NULL, locked = TRUE)

as_secret(x, secrets = NULL)

is_secret(x)

scrt_lock(x)

scrt_unlock(x)

scrt_set_secrets(x, secrets)

scrt_locked(x)

Arguments

x

A character vector

secrets

logical of the same size as x. Elements to hide when printing (defaults to all)

Details

secret() and as_secret() creates a secret, casting to character first if needed and possible

is_secret() tests whether an object is a well-formed secret

scrt_lock() and scrt_unlock() lock and unlock the secrets

scrt_set_secrets() sets secret values in a secret

scrt_locked() tests whether a secret is locked or unlocked

Value

A secret


jesse-smith/nbscar documentation built on Dec. 20, 2021, 11:05 p.m.