diff options
author | TrueKuehli <rctcoaster2000@hotmail.de> | 2018-10-01 14:15:05 +0200 |
---|---|---|
committer | TrueKuehli <rctcoaster2000@hotmail.de> | 2018-10-01 14:15:05 +0200 |
commit | 237e4d43229847bb69aadcfa6e6aca517128913b (patch) | |
tree | f36f0a1a1eec574c975d5a33fb6975b13bb457ba /WebInterface/NodeJSServer/src/modules/hash.js | |
parent | 4013f66c732841beaa55733af2b5b9a5efa25572 (diff) |
Documented the code better and made some minor fixes
Diffstat (limited to 'WebInterface/NodeJSServer/src/modules/hash.js')
-rw-r--r-- | WebInterface/NodeJSServer/src/modules/hash.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/WebInterface/NodeJSServer/src/modules/hash.js b/WebInterface/NodeJSServer/src/modules/hash.js index 826c8ee..3abcc21 100644 --- a/WebInterface/NodeJSServer/src/modules/hash.js +++ b/WebInterface/NodeJSServer/src/modules/hash.js @@ -1,3 +1,6 @@ +/** + * Creates Base64 String with SHA-256 Hash of given string + */ String.prototype.getHash = async function() { let data = new ArrayBuffer(this.length * 2); let bufferView = new Uint16Array(data); @@ -14,4 +17,4 @@ String.prototype.getHash = async function() { } return btoa(base64String); -} +}; |