Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidLength = errors.New("pin length must be greater than 0")
)
Functions ¶
func CompareAlphanumeric ¶
CompareAlphanumeric performs a constant-time, case-insensitive comparison of two alphanumeric PINs. Dashes are stripped before comparison, so "ABC-123" matches "abc123". Returns true if they match, false otherwise.
func CompareNumeric ¶
CompareNumeric performs a constant-time comparison of two numeric PINs. Dashes are stripped before comparison, so "123-456" matches "123456". Returns true if they match, false otherwise.
func GenerateAlphanumeric ¶
GenerateAlphanumeric generates a cryptographically secure alphanumeric PIN of the specified length. The generated PIN contains uppercase letters and digits.
func GenerateNumeric ¶
GenerateNumeric generates a cryptographically secure numeric PIN of the specified length.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.