Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@azerothcore/ac-nodejs-srp6

azerothcore16ISC1.0.8TypeScript support: included

Generate verifier for AzerothCore SRP6 authentication.

AzerothCore, SRP6

readme

AzerothCore SRP6

This library is used to generate the SRP6 verifier for AzerothCore, based on https://github.com/Miorey/trinitycore-srp6 (original author)

Usage

To install \ npm install azerothcore-srp6 --save \

Generate verifier with default AzerothCore values:

const { computeVerifier, params } = require(`azerothcore-srp6`)
const myVerifier = computeVerifier(
    params.constants, 
    Buffer.from(salt), 
    username.toUpperCase(), 
    password.toUpperCase()
)

Generate verifier with custom values


const BigInteger = require(`big-integer`)   
const myParam = {
        N_length_bits: 256,
        N: BigInt(`0x894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7`),
        g: BigInt(`0x7`),
        hash: `sha1`
    }
const myVerifier = computeVerifier(
    myParam, 
    Buffer.from(salt), 
    username.toUpperCase(), 
    password.toUpperCase()
)