Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/cookie-signature

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/cookie-signature - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

dist/index.cjs.js

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("crypto");const r=(r,t)=>`${r}.${e.createHmac("sha256",t).update(r).digest("base64").replace(/\=+$/,"")}`;exports.sign=r,exports.unsign=(t,s)=>{const a=t.slice(0,t.lastIndexOf(".")),c=r(a,s),i=Buffer.from(c),n=Buffer.alloc(i.length);return n.write(t),!!e.timingSafeEqual(i,n)&&a};
import{createHmac as e,timingSafeEqual as r}from"crypto";const t=(r,t)=>`${r}.${e("sha256",t).update(r).digest("base64").replace(/=+$/,"")}`,o=(e,o)=>{const f=e.slice(0,e.lastIndexOf(".")),s=t(f,o),a=Buffer.from(s),c=Buffer.alloc(a.length);return c.write(e),!!r(a,c)&&f};export{t as sign,o as unsign};
{
"name": "@tinyhttp/cookie-signature",
"version": "0.0.6",
"version": "0.0.7",
"description": "HTTP cookie signing and unsigning",

@@ -17,5 +17,13 @@ "homepage": "https://github.com/talentlessguy/tinyhttp",

},
"main": "dist/index.js",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"module": "dist/index.esm.js",
"module": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs.js"
},
"./package.json": "./package.json",
"./": "./"
},
"keywords": [

@@ -22,0 +30,0 @@ "tinyhttp",

@@ -7,3 +7,3 @@ # @tinyhttp/cookie-signature

## Installation
## Install

@@ -10,0 +10,0 @@ ```sh

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc