GetSigningMethod retrieves a signing method from an "alg" string
(alg string)
| 28 | |
| 29 | // GetSigningMethod retrieves a signing method from an "alg" string |
| 30 | func GetSigningMethod(alg string) (method SigningMethod) { |
| 31 | signingMethodLock.RLock() |
| 32 | defer signingMethodLock.RUnlock() |
| 33 | |
| 34 | if methodF, ok := signingMethods[alg]; ok { |
| 35 | method = methodF() |
| 36 | } |
| 37 | return |
| 38 | } |
| 39 | |
| 40 | // GetAlgorithms returns a list of registered "alg" names |
| 41 | func GetAlgorithms() (algs []string) { |