(length int)
| 23 | var VerificationValidMinutes = 10 |
| 24 | |
| 25 | func GenerateVerificationCode(length int) string { |
| 26 | code := uuid.New().String() |
| 27 | code = strings.Replace(code, "-", "", -1) |
| 28 | if length == 0 { |
| 29 | return code |
| 30 | } |
| 31 | return code[:length] |
| 32 | } |
| 33 | |
| 34 | func RegisterVerificationCodeWithKey(key string, code string, purpose string) { |
| 35 | verificationMutex.Lock() |
no outgoing calls
no test coverage detected