13 lines
295 B
Go
13 lines
295 B
Go
package httpapi
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
"encoding/hex"
|
|
)
|
|
|
|
// Stable internal IDs keep batch previews and retries consistent without exposing an extra form field.
|
|
func accountSlug(login string) string {
|
|
digest := sha256.Sum256([]byte(login))
|
|
return "u-" + hex.EncodeToString(digest[:10])
|
|
}
|