| 110 | |
| 111 | |
| 112 | bigint octetStream::check_sum(int req_bytes) const |
| 113 | { |
| 114 | auto hash = new unsigned char[req_bytes]; |
| 115 | crypto_generichash(hash, req_bytes, data, get_length(), NULL, 0); |
| 116 | |
| 117 | bigint ans; |
| 118 | bigintFromBytes(ans,hash,req_bytes); |
| 119 | // cout << ans << "\n"; |
| 120 | delete[] hash; |
| 121 | return ans; |
| 122 | } |
| 123 | |
| 124 | |
| 125 | bool octetStream::equals(const octetStream& a) const |
no test coverage detected