sdk/golang/Standard Library/GoCryptoSubtle
Standard Library

GoCryptoSubtle

Go stdlib package — crypto/subtle. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.ConstantTimeByteEq()Neutral
#
Signature
ConstantTimeByteEq(x uint8, y uint8) int

ConstantTimeByteEq returns 1 if x == y and 0 otherwise.

.ConstantTimeCompare()Neutral
#
Signature
ConstantTimeCompare(x []byte, y []byte) int

ConstantTimeCompare returns 1 if the two slices, x and y, have equal contents

.ConstantTimeCopy()Neutral
#
Signature
ConstantTimeCopy(v int, x []byte, y []byte)

ConstantTimeCopy copies the contents of y into x (a slice of equal length)

.ConstantTimeEq()Neutral
#
Signature
ConstantTimeEq(x int32, y int32) int

ConstantTimeEq returns 1 if x == y and 0 otherwise.

.ConstantTimeLessOrEq()Neutral
#
Signature
ConstantTimeLessOrEq(x int, y int) int

ConstantTimeLessOrEq returns 1 if x <= y and 0 otherwise.

.ConstantTimeSelect()Neutral
#
Signature
ConstantTimeSelect(v int, x int, y int) int

ConstantTimeSelect returns x if v == 1 and y if v == 0.

.XORBytes()Neutral
#
Signature
XORBytes(dst []byte, x []byte, y []byte) int

XORBytes sets dst[i] = x[i] ^ y[i] for all i < n = min(len(x), len(y)),

Fully-Qualified Names

FQNField
crypto/subtlefqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # crypto/subtle