BN_mask_bits

Truncate a in place so that only the least-significant n bits remain.

Synopsis

Declared in <openssl/bn.h>

int
BN_mask_bits(
    BIGNUM* a,
    int n);

Return Value

1 on success, or 0 if a has fewer than n bits / on error.

Parameters

NameDescription
aBIGNUM to mask (modified).
nNumber of low bits to keep.