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.
feathers-encryption-hook
Advanced tools
[![Build Status](https://app.travis-ci.com/ydeshayes/feathers-encryption-hook.svg?branch=main)](https://app.travis-ci.com/ydeshayes/feathers-encryption-hook) # Feathers encryption hook
This feathers hook is handling encryption in database for selected fields. It can encrypt before and decrypt data after.
You can import the generated bundle to use the whole library generated by this starter:
import encryptionHook from 'feathers-encryption-hook'
Additionally, you can import the transpiled modules from dist/lib
in case you have a modular library:
import encryptionHook from 'feathers-encryption-hook/dist/lib/feathers-hook-encrypt'
You can use the authentication configuration:
app.set("authentication", {
secret: "secret",
algorithm: "aes-256-cfb"
});
Create an encryption object in your configuation:
"encryption", {
key: "key",
algorithm: "aes-256-cbc"
}
or give the key and algorithm at the hook init:
import encryptionHookInit from 'feathers-encryption-hook';
const encryptionHook = encryptionHookInit({
algorithm: "aes-256-cbc",
key: "*F-JaNdRgUkXp2r5u8x/A?D(G+KbPeSh",
fields: ["foo"]
});
app.service('messages').hooks({
before: {
create: [encryptionHook]
},
after: {
create: [encryptionHook]
}
});
Used in a before hook it will encrypt the fields in fields
.
Used in a after hook it will decrypt the fields in fields
.
npm t
: Run test suitenpm start
: Run npm run build
in watch modenpm run test:watch
: Run test suite in interactive watch modenpm run test:prod
: Run linting and generate coveragenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codenpm run commit
: Commit using conventional commit style huskyFAQs
[![Build Status](https://app.travis-ci.com/ydeshayes/feathers-encryption-hook.svg?branch=main)](https://app.travis-ci.com/ydeshayes/feathers-encryption-hook) # Feathers encryption hook
The npm package feathers-encryption-hook receives a total of 1 weekly downloads. As such, feathers-encryption-hook popularity was classified as not popular.
We found that feathers-encryption-hook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.