Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@adonisjs/encryption
Advanced tools
AdonisJs provider to encrypt and decrypt values
This module is used by AdonisJs to encrypt/decrypt values using a secret key.
Install the package from npm registry as follows:
npm i @adonisjs/encryption
# yarn
yarn add @adonisjs/encryption
and then use it as follows:
import { Encryption } from '@adonisjs/encryption/build/standalone'
const encryption = new Encryption('verylongandrandom32characterskey', {})
const encryptedValue = encryption.encrypt('hello-world')
encryption.decrypt(encryptedValue) // 'hello-world'
The @adonisjs/core
module includes this module by default. However, here's how you can set it up manually.
const providers = [
'@adonisjs/encryption'
]
And then also register the typings file inside tsconfig.json
file.
{
"files": ["./node_modules/@adonisjs/encryption/build/adonis-typings/encryption.d.ts"]
}
And use it as follows:
import Encryption from '@ioc:Adonis/Core/Encryption'
Encryption.encrypt('password')
FAQs
Encryption provider for AdonisJs
The npm package @adonisjs/encryption receives a total of 21,539 weekly downloads. As such, @adonisjs/encryption popularity was classified as popular.
We found that @adonisjs/encryption demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.