INNER CODE UNIT · C
sizeof_pairing
StrobeLabs/eth.zig · src/crypto/blst/src/aggregate.c:63
static const size_t sizeof_pairing = (sizeof(PAIRING) + 7) & ~(size_t)7;
size_t blst_pairing_sizeof(void)
{ return sizeof_pairing; }
void blst_pairing_init(PAIRING *ctx, int hash_or_encode,
const void *DST, size_t DST_len)
{
ctx->ctrl = AGGR_UNDEFINED | (hash_or_encode ? AGGR_HASH_OR_ENCODE : 0);
ctx->nelems = 0;
ctx->DST = (uptr_t)DST==(uptr_t)((byte *)ctx+sizeof_pairing) ? (void *)42
: DST;
ctx->DST_len = DST_len;
}
static const void *pairing_get_dst(const PAIRING *ctx)
{ return (uptr_t)ctx->DST==(uptr_t)42 ? (const byte *)ctx+sizeof_pairing
: ctx->DST;