function lcg(str) {
    let range = 2 ** this.bit - 1;
    if ("number" == typeof str) {
        return str & range;
    }
    let crc = 0,
        bit = this.bit + 1;
    for (let i = 0; i < str.length; i++) {
        crc = (crc * bit ^ str.charCodeAt(i)) & range;
    }

    return 32 === this.bit ? crc + 2147483648 : crc;
}
Linear Congruential Generator (LCG)
@param {!number|bigint|string} str
@this {KeystoreMap|KeystoreSet}