Socket
Socket
Sign inDemoInstall

@machiavelli/steam-client-crypto

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @machiavelli/steam-client-crypto

Steam client connection encryption/decryption protocol.


Version published
Weekly downloads
1
Maintainers
1
Install size
5.45 kB
Created
Weekly downloads
 

Readme

Source

steam-client-crypto

steam-web is a Node.js module that implements the Steam client connection encryption/decryption protocol.

Installation

npm i @machiavelli/steam-client-crypto

Usage

import SteamCrypto from "@machiavelli/steam-client-crypto";

const hashedStr = SteamCrypto.sha1Hash("plaintext");

Methods

  • All methods are static.
  /**
   * Generate a 32-byte symmetric sessionkey and encrypt it with Steam's public "System" key.
   * @param nonce - obtained in channelEncryptResponse when encrypting connection to Steam
   */
  static genSessionKey(nonce: Buffer): SessionKey;
  /**
   * Encrypt data to be sent to Steam
   */
  static encrypt(data: Buffer, key: SessionKey["plain"]): Buffer;
  /**
   * Decrypt data received from Steam
   */
  static decrypt(data: Buffer, key: SessionKey["plain"]): Buffer;
  /**
   * Hash a string or buffer with sha1
   * @returns hashed hex string
   */
  static sha1Hash(input: Buffer | string): string;

Keywords

FAQs

Last updated on 14 Sep 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc