1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00
tobspr_shapez.io/src/js/core/sensitive_utils.encrypt.js
2020-05-14 21:54:11 +02:00

20 lines
501 B
JavaScript

import { globalConfig } from "./config";
import { decompressX64, compressX64 } from "./lzstring";
const Rusha = require("rusha");
const encryptKey = globalConfig.info.sgSalt;
export function decodeHashedString(s) {
return decompressX64(s);
}
export function sha1(str) {
return Rusha.createHash().update(str).digest("hex");
}
// Window.location.host
export function getNameOfProvider() {
return window[decodeHashedString("DYewxghgLgliB2Q")][decodeHashedString("BYewzgLgdghgtgUyA")];
}