pub unsafe extern "C" fn ocrypto_rsa_pss_sha256_crt_sign(
    s: *mut u8,
    s_len: usize,
    m: *const u8,
    m_len: usize,
    salt: *const u8,
    salt_len: usize,
    key: *const ocrypto_rsa_crt_key,
    mem: *mut u32
) -> c_int
Expand description

RSA PSS SHA-256 sign with CRT acceleration.

The message * m - is signed and the signature returned in * s - .

  • s - The generated signature.
  • s_len - Length of * m - .
  • m - The message to be signed.
  • m_len - Length of * m - .
  • salt - The salt to be used.
  • salt_len - Length of * salt - .
  • key - A valid RSA secret key with CRT coefficients.
  • mem - The working memory. Length OCRYPTO_RSA_CRT_MEM_SIZE(bits).

Returns -2 If the salt is too long. Returns 0 On success.

@remark The key * key - should be initialized with * ocrypto_rsa_init_crt_key - . @remark * s - , * m - , and * mem - may be same.