Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.mdns.eu/nextcloud/passwords-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius David Wieschollek <passwords.public@mdns.eu>2021-06-18 15:51:24 +0300
committerMarius David Wieschollek <passwords.public@mdns.eu>2021-06-18 15:51:24 +0300
commit8c005e7bfec7c68728c82d39199a5ba28a451de4 (patch)
treeaebbf63416a84a0ff389447b2f89b23a21fa430a
parent1264cb8b09e58eefe3faa3392deed5165c8190a7 (diff)
Compute hashes correctly
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
-rw-r--r--package.json2
-rw-r--r--src/Classes/EnhancedApi.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/package.json b/package.json
index 71248f2..aacc255 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "passwords-client",
- "version": "0.0.13",
+ "version": "0.0.14",
"description": "JS client library for the Passwords app for Nextcloud",
"main": "src/main.js",
"author": "Marius Wieschollek",
diff --git a/src/Classes/EnhancedApi.js b/src/Classes/EnhancedApi.js
index 8a5c8b4..959dfae 100644
--- a/src/Classes/EnhancedApi.js
+++ b/src/Classes/EnhancedApi.js
@@ -74,9 +74,9 @@ export default class EnhancedApi extends SimpleApi {
* @param [length=40]
* @returns {Promise<string>}
*/
- getHash(value, algorithm = 'SHA-1', length = null) {
- if(length === null) length = this._config.hashLength;
- let hash = this.config.encryption.getHash(value, algorithm);
+ async getHash(value, algorithm = 'SHA-1', length = null) {
+ if(length === null) length = this.config.hashLength;
+ let hash = await this.config.encryption.getHash(value, algorithm);
if(length !== 40) {
return hash.substr(0, length);