std1.0.0-beta-7 SafeC docs

std :: crypto::rsa

Function std::rsa_sign_pss

#include <std/crypto/rsa.h> source ยท definition

int rsa_sign_pss(
    const &RsaPrivateKey key,
    int alg,
    []const unsigned char hash,
    &RngCtx rng,
    []unsigned char sig,
    &unsigned long sig_len,
)

Signs 'hash' (digest_size(alg) bytes) into sig (key.pub.n.bytes bytes; *sig_len set). PSS uses a random salt of the hash's length from 'rng'. 1 on success.