Documentation
¶
Index ¶
- func IsAlphabet(s, allowed string) bool
- func IsBase32Std(s string) bool
- func IsBase64Std(s string) bool
- func IsBase64URLNoPad(s string) bool
- func IsHex(s string) bool
- func IsJWTStructure(s string) bool
- func LengthBetween(s string, min, max int) bool
- func LooksLikeAWSAccessKey(s string) bool
- func LooksLikeAWSSecretKey(s string) bool
- func LooksLikeGitHubToken(s string) bool
- func LooksLikeOpenAIKey(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAlphabet ¶
IsAlphabet returns true if all characters in s are in allowed set.
func IsBase32Std ¶
IsBase32Std reports whether s is valid base32 (padding optional).
func IsBase64Std ¶
IsBase64Std reports whether s is valid standard base64 (padding optional).
func IsBase64URLNoPad ¶
IsBase64URLNoPad reports whether s is valid base64url (no padding) for JWT segments.
func IsJWTStructure ¶
IsJWTStructure verifies 3 segments base64url-decodable for header and payload.
func LengthBetween ¶
LengthBetween returns true if n is within [min,max].
func LooksLikeAWSAccessKey ¶
LooksLikeAWSAccessKey checks for AKIA/ASIA + 16 uppercase alnum.
func LooksLikeAWSSecretKey ¶
LooksLikeAWSSecretKey checks base64-like alphabet and exact length 40.
func LooksLikeGitHubToken ¶
LooksLikeGitHubToken performs simple validation on a GitHub token candidate. Accepts ghp_, gho_, ghu_, ghs_, ghr_ followed by 36 base62 chars.
func LooksLikeOpenAIKey ¶
LooksLikeOpenAIKey checks sk- prefix and reasonable alphabet/length.
Types ¶
This section is empty.