update character limits
This commit is contained in:
parent
0ebddb272d
commit
617608e46f
1 changed files with 2 additions and 2 deletions
4
IGA.ts
4
IGA.ts
|
@ -106,7 +106,7 @@ function checksum(input: string) {
|
|||
}
|
||||
let bin = ""
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
if (input.charCodeAt(i) < 0 || input.charCodeAt(i) > 50000) {
|
||||
if (input.charCodeAt(i) < 0 || input.charCodeAt(i) > 65535) {
|
||||
throw new Error("Character at index " + i + " is not a valid character")
|
||||
}
|
||||
bin += dec2bin(input.charCodeAt(i))
|
||||
|
@ -177,7 +177,7 @@ function hash(input: string, salt: number = 0, len: number = 32, seed?: number):
|
|||
blocks[blocks.length-1][blocks[blocks.length-1].length-1].push(padding.padding[ip])
|
||||
}
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
if (input.charCodeAt(i) < 0 || input.charCodeAt(i) > 50000) {
|
||||
if (input.charCodeAt(i) < 0 || input.charCodeAt(i) > 65535) {
|
||||
throw new Error("Character at index " + i + " is not a valid character")
|
||||
}
|
||||
if (blocks[blocks.length-1].length == 16 && blocks[blocks.length-1][blocks[blocks.length-1].length-1].length == len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue