747 B
747 B
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 inputverifyHash(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.