MCPcopy
hub / github.com/golang-jwt/jwt / init

Function init

hmac.go:24–42  ·  hmac.go::init
()

Source from the content-addressed store, hash-verified

22)
23
24func 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
44func (m *SigningMethodHMAC) Alg() string {
45 return m.Name

Callers

nothing calls this directly

Calls 2

RegisterSigningMethodFunction · 0.85
AlgMethod · 0.65

Tested by

no test coverage detected