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

Function RSA2048SignBytes

common/persistence/utils.go:53–59  ·  view source on GitHub ↗

RSA2048SignBytes 对byte数组执行RSA2048运算

(body []byte, privateKey *rsa.PrivateKey)

Source from the content-addressed store, hash-verified

51
52// RSA2048SignBytes 对byte数组执行RSA2048运算
53func RSA2048SignBytes(body []byte, privateKey *rsa.PrivateKey) ([]byte, error) {
54 hash, err := SHA256Bytes(body)
55 if err != nil {
56 return nil, err
57 }
58 return RSA2048Sign(hash, privateKey)
59}
60
61// RSA2048Sign 用RSA2048运算签名
62func RSA2048Sign(hash []byte, privateKey *rsa.PrivateKey) ([]byte, error) {

Callers 1

RSA2048SignStringFunction · 0.85

Calls 2

SHA256BytesFunction · 0.85
RSA2048SignFunction · 0.85

Tested by

no test coverage detected