add readme
This commit is contained in:
parent
3c308ccb21
commit
10d31096d5
1 changed files with 16 additions and 0 deletions
16
README.md
Normal file
16
README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# IGA (Insecure Garbling Algorithm)
|
||||
- A hashing like algorithm that can be used to verify the integrity of a file.
|
||||
## Example usage
|
||||
```ts
|
||||
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.
|
Loading…
Add table
Add a link
Reference in a new issue