Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@adonisjs/hash
Advanced tools
Module to hash values with support for PHC string format
This module is used by AdonisJs to hash the user password with first class support for upgrading logic. A big thanks to the author of uphash, who inspired me to use PHC string format. I would have used uphash directly, but the user facing API is different from what I desire.
Install the package from npm registry as follows:
npm i @adonisjs/hash
# yarn
yarn add @adonisjs/hash
and then use it as follows:
import { Hash } from '@adonisjs/hash/build/standalone'
const hash = new Hash({}, config)
const hashedValue = await hash.hash('password')
await hash.verify(hashedValue)
await hash.needsRehash(hashedValue) // false
The @adonisjs/core
module includes this module by default. However, here's how you can set it up manually.
const providers = [
'@adonisjs/hash'
]
And then also register the typings file inside tsconfig.json
file.
{
"files": ["./node_modules/@adonisjs/hash/build/adonis-typings/hash.d.ts"]
}
And use it as follows:
import Hash from '@ioc:Adonis/Core/Hash'
await Hash.hash('password')
You can switch drivers using the use
method.
await Hash.use('bcrypt').hash('password')
Following are the autogenerated files via Typedoc
FAQs
Framework agnostic Password hashing package with support for PHC string format
The npm package @adonisjs/hash receives a total of 16,178 weekly downloads. As such, @adonisjs/hash popularity was classified as popular.
We found that @adonisjs/hash demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.