std.config.secure

*key*

dynamic

+master-defaults+

+master-key+

decrypt-text

added in 3.0

(decrypt-text encrypted)(decrypt-text encrypted key)(decrypt-text encrypted key {:keys [format], :or {format :base-64}})

decrypts text based on key

(decrypt-text “2OJZ7B2JpH7Pa5p9XpDc6w==” -key-) => “hello”

(decrypt-text “d8e259ec1d89a47ecf6b9a7d5e90dceb” -key- {:format :hex}) => “hello”

encrypt-text

added in 3.0

(encrypt-text text)(encrypt-text text key)(encrypt-text text key {:keys [format], :or {format :base-64}})

encrypts text based on key

(encrypt-text “hello” -key-) => “2OJZ7B2JpH7Pa5p9XpDc6w==”

(encrypt-text “hello” -key- {:format :hex}) => “d8e259ec1d89a47ecf6b9a7d5e90dceb”

resolve-key

added in 3.0

(resolve-key key)

resolves the key for decryption

(def -key- (resolve-key “3YO19A4QAlRLDc8qmhLD7A==”)) => #’-key-