@vlasky/shacrypt 0.4.0 → 0.5.0
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/CHANGELOG.md +12 -0
- package/package.json +7 -7
- package/src/sha256crypt.c +4 -4
- package/src/sha512crypt.c +4 -4
- package/src/shacrypt.cc +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0] - 2026-01-28
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- **Breaking:** Minimum Node.js version is now 18.0.0
|
|
7
|
+
- Updated NAN to 2.25.0 for Node.js 25 compatibility
|
|
8
|
+
- Updated mocha to 11.3.0 and chai to 6.2.2
|
|
9
|
+
- Replaced `NODE_MODULE` with `NAN_MODULE_WORKER_ENABLED` for proper module registration
|
|
10
|
+
- Fixed null pointer subtraction warnings in sha256crypt.c and sha512crypt.c using `uintptr_t`
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Support for Node.js 25
|
|
14
|
+
|
|
3
15
|
## [0.4.0] - 2025-06-27
|
|
4
16
|
|
|
5
17
|
### Added
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlasky/shacrypt",
|
|
3
3
|
"description": "Node.js wrapper over sha256-crypt and sha512-crypt functions originally created by Ulrich Drepper https://www.akkadia.org/drepper/SHA-crypt.txt",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"homepage": "https://github.com/vlasky/shacrypt",
|
|
6
6
|
"author": "Vlad Lasky <github@vladlasky.com> (https://github.com/vlasky/)",
|
|
7
7
|
"contributors": [
|
|
@@ -13,21 +13,21 @@
|
|
|
13
13
|
"test": "make test"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"nan": "^2.
|
|
16
|
+
"nan": "^2.25.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
"chai": "^6.2.2",
|
|
20
|
+
"mocha": "^11.3.0"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">= 18.0.0"
|
|
24
24
|
},
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/vlasky/shacrypt/issues"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git://github.com/vlasky/shacrypt.git"
|
|
31
31
|
},
|
|
32
32
|
"gypfile": true,
|
|
33
33
|
"readmeFilename": "README.md",
|
package/src/sha256crypt.c
CHANGED
|
@@ -364,21 +364,21 @@ sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
|
|
|
364
364
|
salt_len = MIN (strcspn (salt, "$"), SALT_LEN_MAX);
|
|
365
365
|
key_len = strlen (key);
|
|
366
366
|
|
|
367
|
-
if ((key
|
|
367
|
+
if ((uintptr_t)key % __alignof__ (uint32_t) != 0)
|
|
368
368
|
{
|
|
369
369
|
char *tmp = (char *) alloca (key_len + __alignof__ (uint32_t));
|
|
370
370
|
key = copied_key = (char *)
|
|
371
371
|
memcpy (tmp + __alignof__ (uint32_t)
|
|
372
|
-
- (tmp
|
|
372
|
+
- (uintptr_t)tmp % __alignof__ (uint32_t),
|
|
373
373
|
key, key_len);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
if ((salt
|
|
376
|
+
if ((uintptr_t)salt % __alignof__ (uint32_t) != 0)
|
|
377
377
|
{
|
|
378
378
|
char *tmp = (char *) alloca (salt_len + __alignof__ (uint32_t));
|
|
379
379
|
salt = copied_salt = (char *)
|
|
380
380
|
memcpy (tmp + __alignof__ (uint32_t)
|
|
381
|
-
- (tmp
|
|
381
|
+
- (uintptr_t)tmp % __alignof__ (uint32_t),
|
|
382
382
|
salt, salt_len);
|
|
383
383
|
}
|
|
384
384
|
|
package/src/sha512crypt.c
CHANGED
|
@@ -394,21 +394,21 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
|
|
|
394
394
|
salt_len = MIN (strcspn (salt, "$"), SALT_LEN_MAX);
|
|
395
395
|
key_len = strlen (key);
|
|
396
396
|
|
|
397
|
-
if ((key
|
|
397
|
+
if ((uintptr_t)key % __alignof__ (uint64_t) != 0)
|
|
398
398
|
{
|
|
399
399
|
char *tmp = (char *) alloca (key_len + __alignof__ (uint64_t));
|
|
400
400
|
key = copied_key = (char *)
|
|
401
401
|
memcpy (tmp + __alignof__ (uint64_t)
|
|
402
|
-
- (tmp
|
|
402
|
+
- (uintptr_t)tmp % __alignof__ (uint64_t),
|
|
403
403
|
key, key_len);
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
if ((salt
|
|
406
|
+
if ((uintptr_t)salt % __alignof__ (uint64_t) != 0)
|
|
407
407
|
{
|
|
408
408
|
char *tmp = (char *) alloca (salt_len + __alignof__ (uint64_t));
|
|
409
409
|
salt = copied_salt = (char *)
|
|
410
410
|
memcpy (tmp + __alignof__ (uint64_t)
|
|
411
|
-
- (tmp
|
|
411
|
+
- (uintptr_t)tmp % __alignof__ (uint64_t),
|
|
412
412
|
salt, salt_len);
|
|
413
413
|
}
|
|
414
414
|
|
package/src/shacrypt.cc
CHANGED