diff options
Diffstat (limited to 'backend/security/hash.go')
| -rw-r--r-- | backend/security/hash.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/security/hash.go b/backend/security/hash.go index b6ce167..cf7ef61 100644 --- a/backend/security/hash.go +++ b/backend/security/hash.go @@ -11,9 +11,9 @@ import ( const UrlLength = 7 // GenerateURI creates a unique identifier for a paste based on ip and timestamp -func GenerateURI(ip string) string { +func GenerateURI(content string) string { timeStamp := time.Now().String() - return hashString(ip + timeStamp)[:UrlLength] + return hashString(content + timeStamp)[:UrlLength] } // hashes using MD5 and then converts to base 62 |