implemented verifiaction db
This commit is contained in:
11
api/pkg/db/internal/mongo/verificationimp/hash.go
Normal file
11
api/pkg/db/internal/mongo/verificationimp/hash.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package verificationimp
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
func tokenHash(rawToken string) string {
|
||||
hash := sha256.Sum256([]byte(rawToken))
|
||||
return base64.RawURLEncoding.EncodeToString(hash[:])
|
||||
}
|
||||
Reference in New Issue
Block a user