![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cookie-encryption
Advanced tools
Encrypt/decrypt data to store on cookie, with memoization. This class is built with arc4 cipher, autokey cipher, nodejs ciphers, nodejs hash, nodejs hmac, nodejs pbkdf2 and nodejs diffiehellman,
Install through NPM
npm install cookie-encryption
or
git clone git://github.com/hex7c0/cookie-encryption.git
inside expressjs project
var cookiee = require('cookie-encryption');
var vault = cookiee('ciao');
return supported ciphers
var cookiee = require('cookie-encryption');
cookiee.getCiphers();
Check Cookie options
write data ('pippo') to selected cookie
vault.write(req, 'pippo');
read data from selected cookie
vault.read(req);
flush data cache
vault.flush();
optional arguments inside of previous methods
* @param {String} [cookie] - fast cookie
* @param {String} [encoding] - fast encoding
secret
- String | Buffer Set password (default "required")cipher
- String Type of cipher, grab list from getCiphers
(default "arc4")domain
- String Domain of cookie (default "null")cookie
- String Name of cookie (default "vault")path
- String Path of cookie (default "/")maxAge
- Number Age of cookie in millisecond (default "1 year")httpOnly
- Boolean Flag for http only cookie (default "false")secure
- Boolean Flag for using cookie over TLS/SSL (default "false")signed
- Boolean Will use the secret passed to cookieParser(secret) to sign the value (default "false")encoding
- String Type of output encoding by nodejs (default "hex")extra
- Array Extra info for Hmac
([true]
to enable instead of Hash
) and pbkdf2
([salt, iterations, keylen]
) (default "[ ]
")Take a look at my examples
FAQs
encrypt/decrypt data to store on cookie, with memoization
We found that cookie-encryption 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.