pub unsafe extern "C" fn ocrypto_rsa_init_key(
key: *mut ocrypto_rsa_key,
key_mem: *mut u32,
n: *const u8,
n_len: usize,
d: *const u8,
d_len: usize,
) -> c_intExpand description
RSA secret key setup.
key- The initialized secret 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- .d- The secret exponent, unsigned big-endian.d_len- Length of *d- . Must be <= *n_len- .
Returns -1 If the input length is invalid. Returns 0 On success.
@remark The n and d values can be read directly from the corresponding value parts of a DER encoded RSAPrivateKey.