aboutsummaryrefslogtreecommitdiff
path: root/lib/nacl-util.min.js
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-04-19 09:38:52 -0500
committerEv Bogue <ev@evbogue.com>2019-04-19 09:38:52 -0500
commit0d07708fe1ae9164ec1b361f60c5186af7ac7aed (patch)
tree7bad9765de7d78b91369b2b1dd623217bbd3e4e4 /lib/nacl-util.min.js
parent951d2b36fe8bf2cd7c88eb7c22215708bde36c14 (diff)
major refactor -- only storing author, hash, and signatures on messages and opening signed messages with nacl.sign.open
Diffstat (limited to 'lib/nacl-util.min.js')
-rw-r--r--lib/nacl-util.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/nacl-util.min.js b/lib/nacl-util.min.js
new file mode 100644
index 0000000..0867ece
--- /dev/null
+++ b/lib/nacl-util.min.js
@@ -0,0 +1 @@
+!function(e,n){"use strict";"undefined"!=typeof module&&module.exports?module.exports=n():e.nacl?e.nacl.util=n():(e.nacl={},e.nacl.util=n())}(this,function(){"use strict";function e(e){if(!/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}var n={};return n.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var n,r=unescape(encodeURIComponent(e)),t=new Uint8Array(r.length);for(n=0;n<r.length;n++)t[n]=r.charCodeAt(n);return t},n.encodeUTF8=function(e){var n,r=[];for(n=0;n<e.length;n++)r.push(String.fromCharCode(e[n]));return decodeURIComponent(escape(r.join("")))},"undefined"==typeof atob?"undefined"!=typeof Buffer.from?(n.encodeBase64=function(e){return Buffer.from(e).toString("base64")},n.decodeBase64=function(n){return e(n),new Uint8Array(Array.prototype.slice.call(Buffer.from(n,"base64"),0))}):(n.encodeBase64=function(e){return new Buffer(e).toString("base64")},n.decodeBase64=function(n){return e(n),new Uint8Array(Array.prototype.slice.call(new Buffer(n,"base64"),0))}):(n.encodeBase64=function(e){var n,r=[],t=e.length;for(n=0;n<t;n++)r.push(String.fromCharCode(e[n]));return btoa(r.join(""))},n.decodeBase64=function(n){e(n);var r,t=atob(n),o=new Uint8Array(t.length);for(r=0;r<t.length;r++)o[r]=t.charCodeAt(r);return o}),n}); \ No newline at end of file