@behance/eref-js

2.0.3 • Public • Published

eref-js

Background

What is an eref?

An eref is an ARC4 encrypted reference that contains an encrypted contentId in the Livefyre system.

Install

npm install

Test

To run in phantomjs: npm test To run in the browser, npm start and navigate to http://localhost:{port}/tests/runner.html

API

decryptErefs(arrayOfErefs, arrayOfKeys)

Given an array of erefs and an array of possible keys to decode the erefs, this function will return the first contentId of an eref it is able to decode, or undefined if none are correctly decoded.

###decryptEref(eref, arrayOfKeys)

Given an single eref and an array of keys, attempts to decrypt the eref and return a contentId. If it is not possible, will return undefined.

Readme

Keywords

none

Package Sidebar

Install

npm i @behance/eref-js

Weekly Downloads

1

Version

2.0.3

License

MIT

Last publish

Collaborators

  • chthomas
  • lanniemiao
  • mtrajano93
  • moskalen
  • elewis
  • mansinarain
  • attamusc
  • weikinhuang
  • mase
  • agaripian
  • nemtsov
  • bryanpackman
  • matt-oconnell
  • mlebrun
  • andyroo2000
  • ingluisjimenez
  • gtuckeradobe
  • tpaparne
  • danicasapit
  • dfoxinator
  • jelee11
  • jmedoy
  • bossjones
  • mtldo
  • jushean
  • bryanlatten
  • sadraei
  • tracyfogel
  • kangman
  • iooi
  • benake
  • davestein