| 1160 | } |
| 1161 | |
| 1162 | void CryptoManager::writeDbHeader(thread_db* tdbb, ULONG runpage) |
| 1163 | { |
| 1164 | CchHdr hdr(tdbb, LCK_write); |
| 1165 | |
| 1166 | Ods::header_page* header = hdr.write(); |
| 1167 | header->hdr_crypt_page = runpage; |
| 1168 | if (!runpage) |
| 1169 | { |
| 1170 | header->hdr_flags &= ~Ods::hdr_crypt_process; |
| 1171 | process = false; |
| 1172 | |
| 1173 | if (!crypt) |
| 1174 | { |
| 1175 | ClumpletWriter hc(ClumpletWriter::UnTagged, header->hdr_page_size); |
| 1176 | hdr.getClumplets(hc); |
| 1177 | hc.deleteWithTag(Ods::HDR_crypt_hash); |
| 1178 | hc.deleteWithTag(Ods::HDR_crypt_key); |
| 1179 | hdr.setClumplets(hc); |
| 1180 | } |
| 1181 | } |
| 1182 | |
| 1183 | digitalySignDatabase(tdbb, hdr); |
| 1184 | hdr.flush(); |
| 1185 | } |
| 1186 | |
| 1187 | bool CryptoManager::read(thread_db* tdbb, FbStatusVector* sv, Ods::pag* page, IOCallback* io) |
| 1188 | { |
nothing calls this directly
no test coverage detected