| 39 | } |
| 40 | |
| 41 | td::SecureString MessageEncryption::gen_deterministic_prefix(td::int64 data_size, td::int64 min_padding) { |
| 42 | td::SecureString buff( |
| 43 | td::narrow_cast<size_t>(((min_padding + 15 + data_size) & ~static_cast<td::int64>(15)) - data_size), '\0'); |
| 44 | buff.as_mutable_slice().ubegin()[0] = td::narrow_cast<td::uint8>(buff.size()); |
| 45 | CHECK((buff.size() + data_size) % 16 == 0); |
| 46 | return buff; |
| 47 | } |
| 48 | |
| 49 | td::SecureString MessageEncryption::kdf(td::Slice secret, td::Slice password, int iterations) { |
| 50 | td::SecureString new_secret(64); |
nothing calls this directly
no outgoing calls
no test coverage detected