Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.appId = appId;
this.hash = hash;
this.version = version;
if (dataCenter) {
let dcPieces = dataCenter.split(':');
this.dataCenter = {
host: dcPieces[0],
port: dcPieces.length > 1 ? dcPieces[1] : DEFAULT_DATACENTER_PORT
};
} else {
this.dataCenter = tg.PROD_PRIMARY_DC;
}
if (encryptedAuthKey) {
this.authKey = tg.retrieveAuthKey(new Buffer(encryptedAuthKey, 'hex'), hash);
}
}