(key string, code string, purpose string)
| 32 | } |
| 33 | |
| 34 | func RegisterVerificationCodeWithKey(key string, code string, purpose string) { |
| 35 | verificationMutex.Lock() |
| 36 | defer verificationMutex.Unlock() |
| 37 | verificationMap[purpose+key] = verificationValue{ |
| 38 | code: code, |
| 39 | time: time.Now(), |
| 40 | } |
| 41 | if len(verificationMap) > verificationMapMaxSize { |
| 42 | removeExpiredPairs() |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func VerifyCodeWithKey(key string, code string, purpose string) bool { |
| 47 | verificationMutex.Lock() |
no test coverage detected