api documentation for jose-lite (2019.10.25)

this zero-dependency package will provide a standalone solution to encrypt/decrypt json-web-tokens in both browser/node

table of contents

  1. module jose-lite
    1. function jose-lite.assertOrThrow (passed, message)
    2. function jose-lite.base64FromBuffer (buf)
    3. function jose-lite.base64ToBuffer (str)
    4. function jose-lite.base64urlFromBuffer (str)
    5. function jose-lite.coalesce (...argList)
    6. function jose-lite.cryptoEncryptAes128cbc (key, iv, data, mode)
    7. function jose-lite.cryptoKeyUnwrap256 (KK, RR)
    8. function jose-lite.cryptoKeyWrap256 (KK, RR, mode)
    9. function jose-lite.cryptoRandomBuffer (nn)
    10. function jose-lite.cryptoSignHmacSha256 (key, data)
    11. function jose-lite.fsRmrfSync (dir)
    12. function jose-lite.fsWriteFileWithMkdirpSync (file, data)
    13. function jose-lite.functionOrNop (fnc)
    14. function jose-lite.identity (val)
    15. function jose-lite.jweDecrypt (opt)
    16. function jose-lite.jweEncrypt (opt)
    17. function jose-lite.jweValidate (opt)
    18. function jose-lite.jwsDecode (key, jwsCompact)
    19. function jose-lite.jwsEncode (key, payload, mode)
    20. function jose-lite.jwsValidate (key, jwsCompact)
    21. function jose-lite.nop ()
    22. function jose-lite.objectAssignDefault (target, source)
    23. function jose-lite.querySelector (selectors)
    24. function jose-lite.querySelectorAll (selectors)
    25. number jose-lite.timeExit
    26. object jose-lite.jose
    27. object jose-lite.local
    28. string jose-lite.__dirname

module jose-lite

function jose-lite.assertOrThrow (passed, message)

function jose-lite.base64FromBuffer (buf)

function jose-lite.base64ToBuffer (str)

function jose-lite.base64urlFromBuffer (str)

function jose-lite.coalesce (...argList)

function jose-lite.cryptoEncryptAes128cbc (key, iv, data, mode)

function jose-lite.cryptoKeyUnwrap256 (KK, RR)

function jose-lite.cryptoKeyWrap256 (KK, RR, mode)

function jose-lite.cryptoRandomBuffer (nn)

function jose-lite.cryptoSignHmacSha256 (key, data)

function jose-lite.fsRmrfSync (dir)

function jose-lite.fsWriteFileWithMkdirpSync (file, data)

function jose-lite.functionOrNop (fnc)

function jose-lite.identity (val)

function jose-lite.jweDecrypt (opt)

function jose-lite.jweEncrypt (opt)

function jose-lite.jweValidate (opt)

function jose-lite.jwsDecode (key, jwsCompact)

function jose-lite.jwsEncode (key, payload, mode)

function jose-lite.jwsValidate (key, jwsCompact)

function jose-lite.nop ()

function jose-lite.objectAssignDefault (target, source)

function jose-lite.querySelector (selectors)

function jose-lite.querySelectorAll (selectors)

[ this document was created with utility2 ]