Skip to main content

public_component_to_bn

Function public_component_to_bn 

Source
fn public_component_to_bn(
    bytes: &[u8],
) -> Result<DetachablePointer<*mut BIGNUM>, KeyRejected>
Expand description

Converts one of the public components (n or e) of a PublicKeyComponents into a BIGNUM, enforcing the documented “without leading zeros” encoding.

Every API that consumes a PublicKeyComponents must go through this so that a given value is accepted (or rejected) consistently by all of them.