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

@alipay/faas-server-sdk

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alipay/faas-server-sdk - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

3

lib/sign.js

@@ -7,5 +7,6 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SignOptions=exports.sign=void 0;const node_crypto_1=require("node:crypto");function sign(e){const s=e.signedHeaders.join(",");let t="";for(const a of e.signedHeaders){const u=e.headers[a];t+=`${a}:${u}

`+s+`
`+n,r="HMAC-SHA256",c=getHash(d),h=`${r}
`+n+`
`,r="HMAC-SHA256",c=getHash(d),h=`${r}
${e.timestamp}
${c}
`,i=sha256(h,e.secretKey);return`${r} Credential=${e.secretId}, SignedHeaders=${s}, Signature=${i}`}exports.sign=sign;function sha256(e,s=""){return(0,node_crypto_1.createHmac)("sha256",s).update(e).digest("hex")}function getHash(e){return(0,node_crypto_1.createHash)("sha256").update(e).digest("hex")}class SignOptions{path;query;secretId;secretKey;method;body;headers;timestamp;signedHeaders;constructor(s){this.secretId=s.secretId,this.secretKey=s.secretKey,this.method=s.method,this.headers=s.headers,this.timestamp=s.timestamp,this.body=s.body,this.signedHeaders=s.signedHeaders}}exports.SignOptions=SignOptions;
{
"name": "@alipay/faas-server-sdk",
"version": "0.0.24",
"version": "0.0.25",
"description": "云函数服务 SDK",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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