Skip to content

Commit

Permalink
Added hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
devgeeks committed Sep 21, 2017
1 parent 8ea49c2 commit 2759171
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export default class Echidnajs {
return this.remote.sync(...args);
}

hash(text) {
const hash = nacl.hash(nacl.util.decodeUTF8(text));
return nacl.util.encodeBase64(hash);
}

close() {
this.remote.close();
this.pouch.close();
Expand Down

0 comments on commit 2759171

Please sign in to comment.