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-15 17:31:59 +02:00
.gitignore hello git 2025-05-15 17:24:37 +02:00
hash.ts hello git 2025-05-15 17:24:37 +02:00
IGA.ts hello git 2025-05-15 17:24:37 +02:00
package.json hello git 2025-05-15 17:24:37 +02:00
README.md add readme 2025-05-15 17:31:59 +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, iterations: number = 32, len: number = 32, seed?: number): string - creates a "hash" from the input
  • verifyHash(input: string, inHash: string, salt: number = 0, iterations: number = 32, 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.