@adonisjs/encryption
Advanced tools
Comparing version 4.0.5 to 4.0.6
@@ -42,3 +42,3 @@ "use strict"; | ||
this.validateSecret(); | ||
this.cryptoKey = crypto_1.createHash('sha256').update(this.options.secret).digest(); | ||
this.cryptoKey = (0, crypto_1.createHash)('sha256').update(this.options.secret).digest(); | ||
this.verifier = new MessageVerifier_1.MessageVerifier(this.options.secret); | ||
@@ -68,3 +68,3 @@ } | ||
*/ | ||
const cipher = crypto_1.createCipheriv(this.algorithm, this.cryptoKey, iv); | ||
const cipher = (0, crypto_1.createCipheriv)(this.algorithm, this.cryptoKey, iv); | ||
/** | ||
@@ -131,3 +131,3 @@ * Encoding value to a string so that we can set it on the cipher | ||
try { | ||
const decipher = crypto_1.createDecipheriv(this.algorithm, this.cryptoKey, iv); | ||
const decipher = (0, crypto_1.createDecipheriv)(this.algorithm, this.cryptoKey, iv); | ||
const decrypted = decipher.update(encrypted, 'base64', 'utf8') + decipher.final('utf8'); | ||
@@ -134,0 +134,0 @@ return new helpers_1.MessageBuilder().verify(decrypted, purpose); |
@@ -26,3 +26,3 @@ "use strict"; | ||
generate(value) { | ||
return helpers_1.base64.urlEncode(crypto_1.createHmac('sha256', this.key).update(value).digest()); | ||
return helpers_1.base64.urlEncode((0, crypto_1.createHmac)('sha256', this.key).update(value).digest()); | ||
} | ||
@@ -33,5 +33,5 @@ /** | ||
compare(value, existingHmac) { | ||
return helpers_1.safeEqual(this.generate(value), existingHmac); | ||
return (0, helpers_1.safeEqual)(this.generate(value), existingHmac); | ||
} | ||
} | ||
exports.Hmac = Hmac; |
@@ -30,3 +30,3 @@ "use strict"; | ||
*/ | ||
this.cryptoKey = crypto_1.createHash('sha256').update(this.secret).digest(); | ||
this.cryptoKey = (0, crypto_1.createHash)('sha256').update(this.secret).digest(); | ||
/** | ||
@@ -33,0 +33,0 @@ * Use `dot` as a separator for joining encrypted value, iv and the |
{ | ||
"name": "@adonisjs/encryption", | ||
"version": "4.0.5", | ||
"version": "4.0.6", | ||
"description": "Encryption provider for AdonisJs", | ||
@@ -44,14 +44,14 @@ "main": "build/providers/EncryptionProvider.js", | ||
"@adonisjs/application": "^5.1.5", | ||
"@adonisjs/mrm-preset": "^4.1.2", | ||
"@adonisjs/mrm-preset": "^5.0.2", | ||
"@adonisjs/require-ts": "^2.0.7", | ||
"@poppinss/dev-utils": "^1.1.5", | ||
"@types/node": "^16.3.3", | ||
"@poppinss/dev-utils": "^2.0.1", | ||
"@types/node": "^17.0.8", | ||
"del-cli": "^4.0.1", | ||
"eslint": "^7.31.0", | ||
"eslint": "^8.7.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-adonis": "^1.3.3", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-adonis": "^2.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"github-label-sync": "^2.0.1", | ||
"husky": "^7.0.1", | ||
"japa": "^3.1.1", | ||
"japa": "^4.0.0", | ||
"mrm": "^3.0.2", | ||
@@ -81,3 +81,3 @@ "np": "^7.5.0", | ||
"dependencies": { | ||
"@poppinss/utils": "^3.1.4" | ||
"@poppinss/utils": "^4.0.1" | ||
}, | ||
@@ -84,0 +84,0 @@ "peerDependencies": { |
@@ -26,3 +26,3 @@ <div align="center"> | ||
<span> | </span> | ||
<a href="https://preview.adonisjs.com/guides/security/encryption"> | ||
<a href="https://docs.adonisjs.com/guides/security/encryption"> | ||
Guides | ||
@@ -29,0 +29,0 @@ </a> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26494
+ Added@types/node@22.10.1(transitive)
- Removed@poppinss/utils@3.3.1(transitive)
- Removed@types/node@22.10.0(transitive)
- Removedbuffer-alloc@1.2.0(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedbuffer-fill@1.0.0(transitive)
Updated@poppinss/utils@^4.0.1