pcrypto consistency

This commit is contained in:
Levi Neely 2025-03-01 17:56:17 +01:00
parent c797aa2617
commit 2c2f31b45e
3 changed files with 3 additions and 3 deletions

View File

@ -492,7 +492,7 @@ static int memcmp_const(const unsigned char *s1, const unsigned char *s2,
return (((r - 1) >> 8) & 1) ^ 1;
}
void pcrypto_encode_sector(
void pcrypto_encode_sec(
pcrypto_sector_encdec_t enc, const unsigned char *data,
size_t datalen, unsigned char *out, pcrypto_sector_auth_t authout,
uint64_t sectorid) {

View File

@ -88,7 +88,7 @@ void pcrypto_ctr_encdec_decode(pcrypto_ctr_encdec_t enc, void *data, size_t data
void pcrypto_ctr_encdec_free(pcrypto_ctr_encdec_t enc);
int pcrypto_decode_sector(pcrypto_sector_encdec_t enc, const unsigned char *data, size_t datalen, unsigned char *out, const pcrypto_sector_auth_t auth, uint64_t sectorid);
unsigned char * pcrypto_decode_text(pcrypto_textdec_t enc, const unsigned char *data, size_t datalen);
void pcrypto_encode_sector(pcrypto_sector_encdec_t enc, const unsigned char *data, size_t datalen, unsigned char *out, pcrypto_sector_auth_t authout, uint64_t sectorid);
void pcrypto_encode_sec(pcrypto_sector_encdec_t enc, const unsigned char *data, size_t datalen, unsigned char *out, pcrypto_sector_auth_t authout, uint64_t sectorid);
void pcrypto_encode_text(pcrypto_textenc_t enc, const unsigned char *txt, size_t txtlen, unsigned char **out, size_t *outlen);
psync_symmetric_key_t pcrypto_key();
psync_symmetric_key_t pcrypto_key_len(size_t len);

View File

@ -1186,7 +1186,7 @@ psync_fs_crypto_write_newfile_full_sector(psync_openfile_t *of, const char *buf,
assert(size <= PSYNC_CRYPTO_SECTOR_SIZE);
assert(sizeof(psync_crypto_log_data_record) ==
sizeof(psync_crypto_log_header) + PSYNC_CRYPTO_SECTOR_SIZE);
pcrypto_encode_sector(of->encoder, (const unsigned char *)buf,
pcrypto_encode_sec(of->encoder, (const unsigned char *)buf,
size, rec.data, auth, sectorid);
memset(&rec.header, 0, sizeof(psync_crypto_log_header));
rec.header.type = PSYNC_CRYPTO_LOG_DATA;