https://github.com/aep/feistel
collision-free pseudorandom sequence using a feistel cipher in cycle walking mode
https://github.com/aep/feistel
Last synced: about 1 month ago
JSON representation
collision-free pseudorandom sequence using a feistel cipher in cycle walking mode
- Host: GitHub
- URL: https://github.com/aep/feistel
- Owner: aep
- License: mit
- Created: 2022-04-19T09:21:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-19T09:25:30.000Z (about 4 years ago)
- Last Synced: 2025-10-13T11:46:58.088Z (8 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
collision-free pseudorandom sequence using a feistel cipher in cycle walking mode.
useful for avoiding hotspots in free-lists, or otherwise obfuscating a unique index.
This is NOT encryption. it just makes a sequence look random to the human eye
for example this generates a sequence from 0 to 1000 in deterministic but random-looking order
```golang
package main
import (
"github.com/aep/feistel"
"fmt"
)
func main() {
var max uint32 = 1000;
for i:=uint32(0);i