simple_decode_base64: Simple decoder base64

View source: R/calculation_definitions.R

simple_decode_base64R Documentation

Simple decoder base64

Description

Simple decoder of text strings, will output a text string. Uses sodium library and base64_enc/dec from jsonlite. Has some defaults, but will also take command-line arguments or read from environment. Companion function to simple_encode

Usage

simple_decode_base64(msg, key = NULL, nonce = NULL)

Arguments

msg

the text to decode

key

the cipher, which can be set manually, otherwise will read from env

nonce

a non-secret unique data value used to randomize the cipher

Value

- the encrypted text

returns NA for elements of msg which are NA, or "" empty string. note that simple_encode will ENCRYPT an empty string "".

returns NULL if failure to decode e.g. invalid base64 decode


DavidPatShuiFong/dMeasure documentation built on Aug. 2, 2024, 11:45 p.m.