@@ -50,15 +50,15 @@ import (
50
50
// perhaps using a cryptographic hash function like SHA1.
51
51
52
52
// CryptEncoderSHA1 encodes a password with SHA1
53
- func CryptEncoderSHA1 (pass []byte , hash interface {} ) []byte {
53
+ func CryptEncoderSHA1 (pass []byte , hash any ) []byte {
54
54
h := sha1 .Sum (pass )
55
55
return h [:]
56
56
}
57
57
58
58
// CryptEncoderSSHA1 encodes a password with SHA1 with the
59
59
// configured salt.
60
- func CryptEncoderSSHA1 (salt string ) func (pass []byte , hash interface {} ) []byte {
61
- return func (pass []byte , hash interface {} ) []byte {
60
+ func CryptEncoderSSHA1 (salt string ) func (pass []byte , hash any ) []byte {
61
+ return func (pass []byte , hash any ) []byte {
62
62
s := []byte (salt )
63
63
p := append (pass , s ... )
64
64
h := sha1 .Sum (p )
@@ -67,15 +67,15 @@ func CryptEncoderSSHA1(salt string) func(pass []byte, hash interface{}) []byte {
67
67
}
68
68
69
69
// CryptEncoderSHA256 encodes a password with SHA256
70
- func CryptEncoderSHA256 (pass []byte , hash interface {} ) []byte {
70
+ func CryptEncoderSHA256 (pass []byte , hash any ) []byte {
71
71
h := sha256 .Sum256 (pass )
72
72
return h [:]
73
73
}
74
74
75
75
// CryptEncoderSSHA256 encodes a password with SHA256
76
76
// with the configured salt
77
- func CryptEncoderSSHA256 (salt string ) func (pass []byte , hash interface {} ) []byte {
78
- return func (pass []byte , hash interface {} ) []byte {
77
+ func CryptEncoderSSHA256 (salt string ) func (pass []byte , hash any ) []byte {
78
+ return func (pass []byte , hash any ) []byte {
79
79
s := []byte (salt )
80
80
p := append (pass , s ... )
81
81
h := sha256 .Sum256 (p )
@@ -84,15 +84,15 @@ func CryptEncoderSSHA256(salt string) func(pass []byte, hash interface{}) []byte
84
84
}
85
85
86
86
// CryptEncoderSHA384 encodes a password with SHA384
87
- func CryptEncoderSHA384 (pass []byte , hash interface {} ) []byte {
87
+ func CryptEncoderSHA384 (pass []byte , hash any ) []byte {
88
88
h := sha512 .Sum384 (pass )
89
89
return h [:]
90
90
}
91
91
92
92
// CryptEncoderSSHA384 encodes a password with SHA384
93
93
// with the configured salt
94
- func CryptEncoderSSHA384 (salt string ) func (pass []byte , hash interface {} ) []byte {
95
- return func (pass []byte , hash interface {} ) []byte {
94
+ func CryptEncoderSSHA384 (salt string ) func (pass []byte , hash any ) []byte {
95
+ return func (pass []byte , hash any ) []byte {
96
96
s := []byte (salt )
97
97
p := append (pass , s ... )
98
98
h := sha512 .Sum384 (p )
@@ -101,15 +101,15 @@ func CryptEncoderSSHA384(salt string) func(pass []byte, hash interface{}) []byte
101
101
}
102
102
103
103
// CryptEncoderSHA512 encodes a password with SHA512
104
- func CryptEncoderSHA512 (pass []byte , hash interface {} ) []byte {
104
+ func CryptEncoderSHA512 (pass []byte , hash any ) []byte {
105
105
h := sha512 .Sum512 (pass )
106
106
return h [:]
107
107
}
108
108
109
109
// CryptEncoderSSHA512 encodes a password with SHA512
110
110
// with the configured salt
111
- func CryptEncoderSSHA512 (salt string ) func (pass []byte , hash interface {} ) []byte {
112
- return func (pass []byte , hash interface {} ) []byte {
111
+ func CryptEncoderSSHA512 (salt string ) func (pass []byte , hash any ) []byte {
112
+ return func (pass []byte , hash any ) []byte {
113
113
s := []byte (salt )
114
114
p := append (pass , s ... )
115
115
h := sha512 .Sum512 (p )
0 commit comments