Function nrfxlib_sys::ocrypto_rsa_init_pub_key
source · pub unsafe extern "C" fn ocrypto_rsa_init_pub_key(
key: *mut ocrypto_rsa_pub_key,
key_mem: *mut u32,
n: *const u8,
n_len: usize,
e: u32
) -> c_int
Expand description
variable-bit RSA key setup.
This group of functions is used for generic RSA key setup. / /@{*/ / RSA public key setup.
key
- The initialized public key.key_mem
- Key memory. Length OCRYPTO_RSA_KEY_SIZE(bits). Must have same lifetime as *key
- .n
- The RSA modulus, unsigned big-endian.n_len
- Length of *n
- .e
- Public exponent.
Returns -1 If the input length is invalid. Returns 0 On success.
@remark The n value can be read directly from a DER encoded RSAPublicKey or RSAPrivateKey.