()
| 22 | ) |
| 23 | |
| 24 | func init() { |
| 25 | // HS256 |
| 26 | SigningMethodHS256 = &SigningMethodHMAC{"HS256", crypto.SHA256} |
| 27 | RegisterSigningMethod(SigningMethodHS256.Alg(), func() SigningMethod { |
| 28 | return SigningMethodHS256 |
| 29 | }) |
| 30 | |
| 31 | // HS384 |
| 32 | SigningMethodHS384 = &SigningMethodHMAC{"HS384", crypto.SHA384} |
| 33 | RegisterSigningMethod(SigningMethodHS384.Alg(), func() SigningMethod { |
| 34 | return SigningMethodHS384 |
| 35 | }) |
| 36 | |
| 37 | // HS512 |
| 38 | SigningMethodHS512 = &SigningMethodHMAC{"HS512", crypto.SHA512} |
| 39 | RegisterSigningMethod(SigningMethodHS512.Alg(), func() SigningMethod { |
| 40 | return SigningMethodHS512 |
| 41 | }) |
| 42 | } |
| 43 | |
| 44 | func (m *SigningMethodHMAC) Alg() string { |
| 45 | return m.Name |
nothing calls this directly
no test coverage detected