SigningMethod is an interface that provides a way to sign JWS tokens.
| 4 | |
| 5 | // SigningMethod is an interface that provides a way to sign JWS tokens. |
| 6 | type SigningMethod interface { |
| 7 | // Alg describes the signing algorithm, and is used to uniquely |
| 8 | // describe the specific crypto.SigningMethod. |
| 9 | Alg() string |
| 10 | |
| 11 | // Verify accepts the raw content, the signature, and the key used |
| 12 | // to sign the raw content, and returns any errors found while validating |
| 13 | // the signature and content. |
| 14 | Verify(raw []byte, sig Signature, key interface{}) error |
| 15 | |
| 16 | // Sign returns a Signature for the raw bytes, as well as any errors |
| 17 | // that occurred during the signing. |
| 18 | Sign(raw []byte, key interface{}) (Signature, error) |
| 19 | |
| 20 | // Used to cause quick panics when a crypto.SigningMethod whose form of hashing |
| 21 | // isn't linked in the binary when you register a crypto.SigningMethod. |
| 22 | // To spoof this, see "crypto.SigningMethodNone". |
| 23 | Hasher() crypto.Hash |
| 24 | } |
no outgoing calls
no test coverage detected