SHA256Bytes 对byte数组执行SHA256运算
(body []byte)
| 27 | |
| 28 | // SHA256Bytes 对byte数组执行SHA256运算 |
| 29 | func SHA256Bytes(body []byte) ([]byte, error) { |
| 30 | buf := bytes.NewBuffer(body) |
| 31 | return SHA256Streams([]io.Reader{buf}) |
| 32 | } |
| 33 | |
| 34 | // SHA256Streams 对文件流执行SHA256运算 |
| 35 | func SHA256Streams(streams []io.Reader) ([]byte, error) { |
no test coverage detected