Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/lib/utils/hmac-sha256"

Index

Variables

HEX_CHARS

HEX_CHARS: string = "0123456789abcdef"

MAX_INT32

MAX_INT32: number = 2147483647

Functions

checkSum64

  • checkSum64(challengeParts: Uint32Array, hashParts: Uint32Array): Uint32Array
  • Returns 64 bits (an Uint32 array of length 2) computed from the challengeParts and hashParts. This is retrieved from the source of Skype's web application.

    See _cS64_C in sha256Auth.js at skype-web-reversed for the original implementation:

    Parameters

    • challengeParts: Uint32Array
    • hashParts: Uint32Array

      An Uint32Array of length 4

    Returns Uint32Array

hmacSha256

  • hmacSha256(input: Buffer, productId: Buffer, productKey: Buffer): string
  • This computes the Hash-based message authentication code (HMAC) of the input buffer by using SHA-256 and the checkSum64 function. This is retrieved from the source of Skype's web application.

    See getMacHash in sha256Auth.js at skype-web-reversed for the original implementation tslint:disable-next-line:max-line-length

    Parameters

    • input: Buffer
    • productId: Buffer
    • productKey: Buffer

    Returns string

    An hexadecimal 32-chars long string

int32ToLittleEndianHexString

  • int32ToLittleEndianHexString(int32: number): string
  • Returns a zero-padded (8 chars long) hex-string of the little-endian representation the argument.

    The relation between the characters of .toString(16) (big-endian) is: .toString(16): <76543210> int32ToLittleEndianHexString: <10325476>

    Example: .toString(16): ed81c15a int32ToLittleEndianHexString: 5ac181ed

    Parameters

    • int32: number

    Returns string

uint8ArrayToUint32Array

  • uint8ArrayToUint32Array(uint8Array: Uint8Array): Uint32Array
  • Creates an uint32 array by copying and shifting the uint8 of the argument by groups of four.

    Parameters

    • uint8Array: Uint8Array

      Its length has to be a multiple of 4

    Returns Uint32Array

Generated using TypeDoc