From 237e4d43229847bb69aadcfa6e6aca517128913b Mon Sep 17 00:00:00 2001 From: TrueKuehli Date: Mon, 1 Oct 2018 14:15:05 +0200 Subject: Documented the code better and made some minor fixes --- WebInterface/NodeJSServer/src/modules/hash.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'WebInterface/NodeJSServer/src/modules/hash.js') 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); -} +}; -- cgit v1.2.3-54-g00ecf