Namespace

cryptoForage

cryptoForage

Use currying process to inject

View Source cryptoForage.esm.js, line 12

Methods

# static deBox(key, model, maxlen, row, name, logger, returner) → {object|*}

use the "box" system to decrypt something from the storage

Parameters:
Name Type Description
key string

encryption key

model array

array of acceptable properties (validate)

maxlen string

forage name of key (validate)

row string

forage row (forage)

name string

forage name of key (forage)

logger string

loglevel of errors (forage)

returner number

return type (forage)

View Source cryptoForage.esm.js, line 55

  • the JSON results of our box
object | *
Example
const curry = async function (val) {
   const box = await crypto.secretBox.encrypt({
     json: val,
     key: key
   })
   console.log(box)
   return box
 }

# static enBox(key, logger, returner) → {object|*}

encrypt a functional

Parameters:
Name Type Description
key string

encryption key

logger array

loglevel of errors (forage)

returner array

return type (forage)

View Source cryptoForage.esm.js, line 13

  • the JSON results of our box
object | *
Example
const boxFn = await cryptoForage.enBox({
   key:key,
   loggerType: 'throw',
   returnType: 7
 })(new Date().now())