Lines Matching +full:pre +full:- +full:set
7 EVP_PKEY_sign_message_final - sign using a public key algorithm
39 signing a pre-computed message digest using the algorithm given by I<algo> and
41 A context I<ctx> without a pre-loaded key cannot be used with this function.
43 but is uniquely intended to be used with a pre-computed message digest, and
44 allows pre-determining the exact conditions for that message digest, if a
45 composite signature algorithm (such as RSA-SHA256) was fetched.
52 Passing the message is supported both in a one-shot fashion using
56 length, such as ED25519, RSA-SHA256 and similar.
70 EVP_PKEY_sign() is a one-shot function that can be used with all the init
105 i.e. to produce the message digest internally, and while RSA-SHA256 can be
109 Similarly, an RSA implementation usually expects additional details to be set,
112 L<EVP_PKEY_CTX_set_rsa_padding(3)> and similar others), while an RSA-SHA256
113 implementation usually has these details pre-set and immutable.
119 words, it's not possible to specify a I<ctx> pre-loaded with an RSA pkey, or
121 functionality of RSA-SHA256. If combining algorithms in that manner is
128 several one-shot operations performed using the same parameters.
137 In particular, EVP_PKEY_sign_init() and its other variants may return -2 to
157 /* md is a SHA-256 digest in this example. */
163 * NB: assumes signing_key and md are set up before the next
165 * point to the SHA-256 digest to be signed.
191 =head2 RSA-SHA256 with a pre-computed digest
193 Sign a digest with RSA-SHA256 using one-shot functions. To be noted is that
194 RSA-SHA256 is assumed to be an implementation of C<sha256WithRSAEncryption>,
195 for which the padding is pre-determined to be B<RSA_PKCS1_PADDING>, and the
202 /* md is a SHA-256 digest in this example. */
208 * NB: assumes signing_key and md are set up before the next
210 * point to the SHA-256 digest to be signed.
213 alg = EVP_SIGNATURE_fetch(NULL, "RSA-SHA256", NULL);
235 =head2 RSA-SHA256, one-shot
237 Sign a document with RSA-SHA256 using one-shot functions.
238 To be noted is that RSA-SHA256 is assumed to be an implementation of
239 C<sha256WithRSAEncryption>, for which the padding is pre-determined to be
254 * NB: assumes signing_key, in and inlen are set up before
260 alg = EVP_SIGNATURE_fetch(NULL, "RSA-SHA256", NULL);
282 =head2 RSA-SHA256, using update and final
284 This is the same as the previous example, but allowing stream-like
299 * NB: assumes signing_key, in and inlen are set up before
305 alg = EVP_SIGNATURE_fetch(NULL, "RSA-SHA256", NULL);
316 inlen -= 256;
361 Copyright 2006-2025 The OpenSSL Project Authors. All Rights Reserved.