otp

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const EMAIL_OTP_LENGTH = 8

EMAIL_OTP_LENGTH defines the length of the OTP to be generated for sending in any kind of email.

Variables

This section is empty.

Functions

func NewAlphaNumericOTP

func NewAlphaNumericOTP(length int) (string, error)

NewAlphaNumericOTP generates an Alphanumeric OTP of the specified length.

Use Case: This function can be used to generate OTPs for two-factor authentication (2FA), password resets, or any other scenario where a short-lived code is required for verification.

func VerifyAlphaNumericOTP

func VerifyAlphaNumericOTP(providedOTP, actualOTP string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL