RSA2048SignBytes 对byte数组执行RSA2048运算
(body []byte, privateKey *rsa.PrivateKey)
| 51 | |
| 52 | // RSA2048SignBytes 对byte数组执行RSA2048运算 |
| 53 | func 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运算签名 |
| 62 | func RSA2048Sign(hash []byte, privateKey *rsa.PrivateKey) ([]byte, error) { |
no test coverage detected