MCPcopy Create free account
hub / github.com/SermoDigital/jose / SigningMethod

Interface SigningMethod

crypto/signing_method.go:6–24  ·  view source on GitHub ↗

SigningMethod is an interface that provides a way to sign JWS tokens.

Source from the content-addressed store, hash-verified

4
5// SigningMethod is an interface that provides a way to sign JWS tokens.
6type 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}

Callers 10

MarshalJSONMethod · 0.65
TestParseGeneralFunction · 0.65
NewFunction · 0.65
signing_methods.goFile · 0.65
RegisterSigningMethodFunction · 0.65
RemoveSigningMethodFunction · 0.65
VerifyMethod · 0.65
SignMethod · 0.65
signMethod · 0.65
RegisterSigningMethodFunction · 0.65

Implementers 5

SigningMethodRSAcrypto/rsa.go
SigningMethodECDSAcrypto/ecdsa.go
SigningMethodHMACcrypto/hmac.go
SigningMethodNonecrypto/none.go
TestSigningMethodjws/signing_methods_test.go

Calls

no outgoing calls

Tested by

no test coverage detected