Files
node-metaverse/lib/classes/LoginParameters.ts
2022-11-04 10:18:55 +00:00

26 lines
601 B
TypeScript

import * as crypto from 'crypto';
export class LoginParameters
{
firstName: string;
lastName: string;
password: string;
start = 'last';
url = 'https://login.agni.lindenlab.com/cgi-bin/login.cgi';
token?: string;
mfa_hash?: string;
agreeToTOS?: true;
readCritical?: true;
passwordPrehashed = false;
getHashedPassword(): string
{
if (this.passwordPrehashed)
{
return this.password;
}
return '$1$' + crypto.createHash('md5').update(this.password.substr(0, 16)).digest('hex');
}
}