crypto.go 214 B

1234567891011121314
  1. package settings
  2. import "crypto/md5"
  3. type Crypto struct {
  4. Secret string `json:"secret"`
  5. }
  6. var CryptoSettings = &Crypto{}
  7. func (c *Crypto) GetSecretMd5() []byte {
  8. k := md5.Sum([]byte(c.Secret))
  9. return k[:]
  10. }