Creating common token store and moving email invites and verification to it (#6213)

Этот коммит содержится в:
Christopher Speller
2017-04-27 10:55:03 -04:00
коммит произвёл Joram Wilander
родитель 0e007e344b
Коммит 9a87bb3af6
30 изменённых файлов: 461 добавлений и 461 удалений

16
utils/hash.go Обычный файл
Просмотреть файл

@@ -0,0 +1,16 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package utils
import (
"crypto/sha256"
"fmt"
)
func HashSha256(text string) string {
hash := sha256.New()
hash.Write([]byte(text))
return fmt.Sprintf("%x", hash.Sum(nil))
}