[#RSA_sign]
= RSA&lowbar;sign
:mrdocs:

Create an RSA signature with PKCS&num;1 DigestInfo wrapping (deprecated)&period;

== Synopsis

Declared in `&lt;openssl&sol;rsa&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
RSA&lowbar;sign(
    int type,
    unsigned char const* m,
    unsigned int m&lowbar;length,
    unsigned char* sigret,
    unsigned int* siglen,
    xref:RSA.adoc[RSA]* rsa);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *type*
| Digest NID identifying the hash algorithm (for example NID&lowbar;sha256)&period;
| *m*
| Digest bytes to sign&period;
| *m&lowbar;length*
| Length of `m` in bytes&period;
| *sigret*
| Buffer of at least RSA&lowbar;size(`rsa)` bytes receiving the signature&period;
| *siglen*
| Receives the signature length in bytes&period;
| *rsa*
| RSA private key&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
