Files
oikos/vendor/github.com/segmentio/asm/keyset/keyset_default.go
dtoro febc153b7f
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled
fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
2026-08-11 22:03:12 +02:00

20 lines
367 B
Go

//go:build purego || !(amd64 || arm64)
// +build purego !amd64,!arm64
package keyset
func Lookup(keyset []byte, key []byte) int {
if len(key) > 16 {
return len(keyset) / 16
}
var padded [16]byte
copy(padded[:], key)
for i := 0; i < len(keyset); i += 16 {
if string(padded[:]) == string(keyset[i:i+16]) {
return i / 16
}
}
return len(keyset) / 16
}