Skip to content
forked from jjjjw/eref-js

Eref parsing for javascript

License

Notifications You must be signed in to change notification settings

behance/eref-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Eref parsing for javascript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%