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

Method Verify

crypto/rsa.go:43–49  ·  view source on GitHub ↗

Verify implements the Verify method from SigningMethod. For this signing method, must be an *rsa.PublicKey.

(raw []byte, sig Signature, key interface{})

Source from the content-addressed store, hash-verified

41// Verify implements the Verify method from SigningMethod.
42// For this signing method, must be an *rsa.PublicKey.
43func (m *SigningMethodRSA) Verify(raw []byte, sig Signature, key interface{}) error {
44 rsaKey, ok := key.(*rsa.PublicKey)
45 if !ok {
46 return ErrInvalidKey
47 }
48 return rsa.VerifyPKCS1v15(rsaKey, m.Hash, m.sum(raw), sig)
49}
50
51// Sign implements the Sign method from SigningMethod.
52// For this signing method, must be an *rsa.PrivateKey structure.

Callers

nothing calls this directly

Calls 1

sumMethod · 0.95

Tested by

no test coverage detected