@travetto/auth-model 8.0.0-alpha.26 → 8.0.0-alpha.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -171,10 +171,10 @@ export class AuthModelUtil {
171
171
  * @param value Value to hash
172
172
  * @param salt The salt value
173
173
  * @param iterations Number of iterations on hashing
174
- * @param keylen Length of hash
174
+ * @param keyLength Length of hash
175
175
  * @param digest Digest method
176
176
  */
177
- static async generateHash(value: string, salt: string, iterations = 25000, keylen = 256, digest = 'SHA-256'): Promise<string>;
177
+ static async generateHash(value: string, salt: string, iterations = 25000, keyLength = 256, digest = 'SHA-256'): Promise<string>;
178
178
  /**
179
179
  * Generate a salted password, with the ability to validate the password
180
180
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/auth-model",
3
- "version": "8.0.0-alpha.26",
3
+ "version": "8.0.0-alpha.27",
4
4
  "type": "module",
5
5
  "description": "Authentication model support for the Travetto framework",
6
6
  "keywords": [
@@ -26,11 +26,11 @@
26
26
  "directory": "module/auth-model"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/auth": "^8.0.0-alpha.22",
30
- "@travetto/model": "^8.0.0-alpha.26"
29
+ "@travetto/auth": "^8.0.0-alpha.23",
30
+ "@travetto/model": "^8.0.0-alpha.27"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/test": "^8.0.0-alpha.23"
33
+ "@travetto/test": "^8.0.0-alpha.25"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/test": {
package/src/util.ts CHANGED
@@ -10,10 +10,10 @@ export class AuthModelUtil {
10
10
  * @param value Value to hash
11
11
  * @param salt The salt value
12
12
  * @param iterations Number of iterations on hashing
13
- * @param keylen Length of hash
13
+ * @param keyLength Length of hash
14
14
  * @param digest Digest method
15
15
  */
16
- static async generateHash(value: string, salt: string, iterations = 25000, keylen = 256, digest = 'SHA-256'): Promise<string> {
16
+ static async generateHash(value: string, salt: string, iterations = 25000, keyLength = 256, digest = 'SHA-256'): Promise<string> {
17
17
  const hashKey = await crypto.subtle.importKey(
18
18
  'raw',
19
19
  BinaryUtil.binaryArrayToBuffer(CodecUtil.fromUTF8String(value)),
@@ -30,10 +30,10 @@ export class AuthModelUtil {
30
30
  iterations
31
31
  },
32
32
  hashKey,
33
- keylen * 8
33
+ keyLength * 8
34
34
  );
35
35
 
36
- return BinaryUtil.binaryArrayToUint8Array(result).toHex().substring(0, keylen);
36
+ return BinaryUtil.binaryArrayToUint8Array(result).toHex().substring(0, keyLength);
37
37
  }
38
38
 
39
39
  /**