@oino-ts/hashid 0.16.1 → 0.16.2
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/dist/cjs/OINOHashid.js +1 -1
- package/dist/esm/OINOHashid.js +1 -1
- package/package.json +3 -3
- package/src/OINOHashid.ts +1 -1
package/dist/cjs/OINOHashid.js
CHANGED
|
@@ -96,7 +96,7 @@ class OINOHashid {
|
|
|
96
96
|
const cryptotext = hashid.substring(this._minLength);
|
|
97
97
|
const cryptobytes = Buffer.from(hashidEncoder.decode(cryptotext));
|
|
98
98
|
const decipher = (0, node_crypto_1.createDecipheriv)('aes-128-gcm', this._key, this._iv);
|
|
99
|
-
const plaintext = decipher.update(cryptobytes, undefined, 'utf8');
|
|
99
|
+
const plaintext = decipher.update(cryptobytes, undefined, 'utf8');
|
|
100
100
|
return plaintext.split(" ")[0];
|
|
101
101
|
}
|
|
102
102
|
}
|
package/dist/esm/OINOHashid.js
CHANGED
|
@@ -93,7 +93,7 @@ export class OINOHashid {
|
|
|
93
93
|
const cryptotext = hashid.substring(this._minLength);
|
|
94
94
|
const cryptobytes = Buffer.from(hashidEncoder.decode(cryptotext));
|
|
95
95
|
const decipher = createDecipheriv('aes-128-gcm', this._key, this._iv);
|
|
96
|
-
const plaintext = decipher.update(cryptobytes, undefined, 'utf8');
|
|
96
|
+
const plaintext = decipher.update(cryptobytes, undefined, 'utf8');
|
|
97
97
|
return plaintext.split(" ")[0];
|
|
98
98
|
}
|
|
99
99
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oino-ts/hashid",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "OINO TS package for hashid's.",
|
|
5
5
|
"author": "Matias Kiviniemi (pragmatta)",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"types": "./dist/types/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@types/node": "^20.12.7",
|
|
21
|
-
"@oino-ts/common": "0.16.
|
|
21
|
+
"@oino-ts/common": "0.16.2",
|
|
22
22
|
"base-x": "^5.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"typescript": "~5.9.0",
|
|
26
|
-
"@oino-ts/types": "0.16.
|
|
26
|
+
"@oino-ts/types": "0.16.2"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src/*.ts",
|
package/src/OINOHashid.ts
CHANGED
|
@@ -104,7 +104,7 @@ export class OINOHashid {
|
|
|
104
104
|
const cryptotext:string = hashid.substring(this._minLength)
|
|
105
105
|
const cryptobytes:Buffer = Buffer.from(hashidEncoder.decode(cryptotext))
|
|
106
106
|
const decipher = createDecipheriv('aes-128-gcm', this._key as Uint8Array, this._iv as Uint8Array)
|
|
107
|
-
const plaintext = decipher.update(cryptobytes as Uint8Array, undefined, 'utf8')
|
|
107
|
+
const plaintext = decipher.update(cryptobytes as Uint8Array, undefined, 'utf8')
|
|
108
108
|
|
|
109
109
|
return plaintext.split(" ")[0]
|
|
110
110
|
}
|