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

@doctormckay/steam-crypto

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doctormckay/steam-crypto - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

12

index.js

@@ -97,1 +97,13 @@ var Crypto = require('crypto');

};
/**
* Decrypt something that was encrypted with AES/ECB/PKCS7
* @param {Buffer} input
* @param {Buffer} key
* @returns {Buffer}
*/
exports.symmetricDecryptECB = function(input, key) {
var decipher = Crypto.createDecipheriv('aes-256-ecb', key, '');
decipher.end(input);
return decipher.read();
};

2

package.json
{
"name": "@doctormckay/steam-crypto",
"version": "1.1.0",
"version": "1.2.0",
"description": "Node.js implementation of Valve's crypto",

@@ -5,0 +5,0 @@ "repository": {

@@ -11,3 +11,4 @@ # node-steam-crypto

## generateSessionKey()
## generateSessionKey([nonce])
- `nonce` - If you were prompted by Steam with a nonce, provide it here (as a Buffer)

@@ -18,8 +19,21 @@ Generates a 32 byte random blob of data and encrypts it with RSA using the Steam system's public key. Returns an object with the following properties:

## symmetricEncrypt(input, sessionKey)
If you provided a nonce, then `encrypted` is the RSA'd concatenation of the session key and the nonce (in that order).
Encrypts `input` using `sessionKey` and returns the result.
## symmetricEncrypt(input, sessionKey[, iv])
## symmetricDecrypt(input, sessionKey)
Encrypts `input` using `sessionKey` and `iv` (or a securely-random IV if you don't provide one) and returns the result.
## symmetricEncryptWithHmacIv(input, sessionKey)
Encrypts `input` using `sessionKey` and an IV which is partially comprised of an HMAC of the `input`.
## symmetricDecrypt(input, sessionKey[, checkHmac])
Decrypts `input` using `sessionKey` and returns the result.
If the IV in this ciphertext contains an HMAC, pass `true` for `checkHmac` and it will be validated. Otherwise, it will
not be validated (default behavior).
## symmetricDecryptECB(input, sessionKey)
Decrypts `input` using `sessionKey` and the AES/ECB/PKCS7 cipher without an IV and returns the result.

Sorry, the diff of this file is not supported yet

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