diff options
Diffstat (limited to 'tpl/crypto/crypto.go')
-rw-r--r-- | tpl/crypto/crypto.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tpl/crypto/crypto.go b/tpl/crypto/crypto.go index 3a825bf15..785b13502 100644 --- a/tpl/crypto/crypto.go +++ b/tpl/crypto/crypto.go @@ -36,7 +36,7 @@ func New() *Namespace { type Namespace struct{} // MD5 hashes the given input and returns its MD5 checksum. -func (ns *Namespace) MD5(in interface{}) (string, error) { +func (ns *Namespace) MD5(in any) (string, error) { conv, err := cast.ToStringE(in) if err != nil { return "", err @@ -47,7 +47,7 @@ func (ns *Namespace) MD5(in interface{}) (string, error) { } // SHA1 hashes the given input and returns its SHA1 checksum. -func (ns *Namespace) SHA1(in interface{}) (string, error) { +func (ns *Namespace) SHA1(in any) (string, error) { conv, err := cast.ToStringE(in) if err != nil { return "", err @@ -58,7 +58,7 @@ func (ns *Namespace) SHA1(in interface{}) (string, error) { } // SHA256 hashes the given input and returns its SHA256 checksum. -func (ns *Namespace) SHA256(in interface{}) (string, error) { +func (ns *Namespace) SHA256(in any) (string, error) { conv, err := cast.ToStringE(in) if err != nil { return "", err @@ -69,7 +69,7 @@ func (ns *Namespace) SHA256(in interface{}) (string, error) { } // HMAC returns a cryptographic hash that uses a key to sign a message. -func (ns *Namespace) HMAC(h interface{}, k interface{}, m interface{}) (string, error) { +func (ns *Namespace) HMAC(h any, k any, m any) (string, error) { ha, err := cast.ToStringE(h) if err != nil { return "", err |