MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / RSA2048VerifyBytes

Function RSA2048VerifyBytes

common/persistence/utils.go:76–82  ·  view source on GitHub ↗

RSA2048VerifyBytes 用RSA2048运算校验byte数组签名

(body []byte, sign []byte, publicKey *rsa.PublicKey)

Source from the content-addressed store, hash-verified

74
75// RSA2048VerifyBytes 用RSA2048运算校验byte数组签名
76func RSA2048VerifyBytes(body []byte, sign []byte, publicKey *rsa.PublicKey) error {
77 hash, err := SHA256Bytes(body)
78 if err != nil {
79 return err
80 }
81 return RSA2048Verify(hash, sign, publicKey)
82}
83
84// RSA2048Verify 用RSA2048运算校验签名
85func RSA2048Verify(hash []byte, sign []byte, publicKey *rsa.PublicKey) error {

Callers 1

RSA2048VerifyStringFunction · 0.85

Calls 2

SHA256BytesFunction · 0.85
RSA2048VerifyFunction · 0.85

Tested by

no test coverage detected