
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
kysely-hash
Advanced tools
Hash plugin for kysely fully typed, developed for Node.js but also runs on Deno and Bun; with this plugin you can hash fields using crypto-js library.
npm i kysely kysely-hash
Options
fieldsToDecrypt: field to hash during insert and update, or in '=' and '!=' where condition (use alias if it is used)
hashAlgorithm: hash algorithm
How to use
WARNING: fields must be of string types
const kyselyInstance = new Kysely<Database>({
dialect: new SqliteDialect({
database: new Database(':memory:'),
}),
})
await kyselyInstance.schema
.createTable('person')
.ifNotExists()
.addColumn('id', 'integer', (col) => col.primaryKey())
.addColumn('first_name', 'varchar(255)')
.addColumn('last_name', 'varchar(255)')
.addColumn('gender', 'varchar(255)')
.execute()
await kyselyInstance
.insertInto('person')
.values([
{
first_name: 'Max',
last_name: 'Jack',
gender: 'man',
},
{
first_name: 'George',
last_name: 'Rossi',
gender: 'man',
},
])
.withPlugin(
new KyselyHashPlugin<Database>({
fieldsToHash: ['last_name'],
hashAlgorithm: 'SHA256',
}),
)
.execute()
Licensed under MIT.
FAQs
Hash plugin for kysely
We found that kysely-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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.