Insecure Garbling Algorithm It's security has not been verified yet. It can't be reverted but it might collide. DO NOT USE FOR SECURE PROJECTS
Find a file
2025-05-29 14:41:53 +02:00
.gitignore do collision tests 2025-05-16 18:35:35 +02:00
collision_test1.ts update everything 2025-05-17 17:42:34 +02:00
collision_test2.ts fix a potential freeze 2025-05-29 14:17:08 +02:00
hash.ts updates 2025-05-17 17:58:36 +02:00
IGA.ts made it faster for bigger files, might compromise security though 2025-05-29 14:41:53 +02:00
LICENSE add license 2025-05-15 17:42:09 +02:00
package.json hello git 2025-05-15 17:24:37 +02:00
README.md update README 2025-05-17 17:44:17 +02:00

IGA (Insecure Garbling Algorithm)

  • A hashing like algorithm that can be used to verify the integrity of a file.

Example usage

import IGA from './IGA'

let hash = IGA.hash("test")
console.log(hash)
console.log(IGA.verifyHash("test", hash))

Functions

  • hash(input: string, salt: number = 0, len: number = 32, seed?: number): string - creates a "hash" from the input
  • verifyHash(input: string, inHash: string, salt: number = 0, len: number = 32): verifyOut - verifies the "hash", returns { valid: bool, reason: string }

DO NOT USE FOR SECURE PROJECTS

  • It's security has not been verified yet.
  • It can't be reverted but it might collide.
  • It seems like the algorithm is safe enough, however, I still don't recommend it.