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

@casual-simulation/aux-records

Package Overview
Dependencies
Maintainers
2
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@casual-simulation/aux-records - npm Package Compare versions

Comparing version 2.0.23 to 2.0.27

4

package.json
{
"name": "@casual-simulation/aux-records",
"version": "2.0.23",
"version": "2.0.27",
"description": "Helpers and managers used by the CasualOS records system.",

@@ -44,3 +44,3 @@ "keywords": [],

},
"gitHead": "6b57a83ce4a3bbe71f8a872eb2d1c0a997f8d873"
"gitHead": "e4feca4722894119ef9c5ffdf0d35989184122f4"
}

@@ -38,2 +38,3 @@ /**

export declare function createAWS4Signature(stringToSign: string, secretAccessKey: string, date: Date, region: string, service: string): string;
export declare function createSigningKey(secretAccessKey: string, date: Date, region: string, service: string, enc?: 'hex'): string;
/**

@@ -40,0 +41,0 @@ * Creates a canonical request string that can be used to create a AWS Signature for the given request.

@@ -76,2 +76,6 @@ import { fromByteArray, toByteArray } from 'base64-js';

export function createAWS4Signature(stringToSign, secretAccessKey, date, region, service) {
const final = createHmac(createSigningKey(secretAccessKey, date, region, service), stringToSign, 'hex');
return final;
}
export function createSigningKey(secretAccessKey, date, region, service, enc) {
const dateString = date.getUTCFullYear() +

@@ -83,5 +87,4 @@ padStart((1 + date.getUTCMonth()).toString(), 2, '0') +

const dateRegionServiceKey = createHmac(dateRegionKey, service);
const signingKey = createHmac(dateRegionServiceKey, 'aws4_request');
const final = createHmac(signingKey, stringToSign, 'hex');
return final;
const signingKey = createHmac(dateRegionServiceKey, 'aws4_request', enc);
return signingKey;
}

@@ -134,2 +137,3 @@ function createHmac(key, data, enc) {

}
str += '\n';
str +=

@@ -136,0 +140,0 @@ headerNames.map(([name, encodedName]) => encodedName).join(';') + '\n';

Sorry, the diff of this file is not supported yet

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