CalDAV support (#15)
This commit is contained in:
11
pkg/utils/sha256.go
Normal file
11
pkg/utils/sha256.go
Normal file
@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Sha256 calculates a sha256 hash from a string
|
||||
func Sha256(cleartext string) string {
|
||||
return fmt.Sprintf("%x", sha256.Sum256([]byte(cleartext)))[:45]
|
||||
}
|
Reference in New Issue
Block a user