()
| 51 | } |
| 52 | |
| 53 | func (r *SharedSecretRegistration) GenerateNonce() string { |
| 54 | nonce := util.RandomString(16) |
| 55 | r.nonces.Set(nonce, true, cache.DefaultExpiration) |
| 56 | return nonce |
| 57 | } |
| 58 | |
| 59 | func (r *SharedSecretRegistration) validNonce(nonce string) bool { |
| 60 | _, exists := r.nonces.Get(nonce) |