diff options
Diffstat (limited to 'doc/functions/gnutls_privkey_sign_data')
-rw-r--r-- | doc/functions/gnutls_privkey_sign_data | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/functions/gnutls_privkey_sign_data b/doc/functions/gnutls_privkey_sign_data new file mode 100644 index 0000000..747e53d --- /dev/null +++ b/doc/functions/gnutls_privkey_sign_data @@ -0,0 +1,28 @@ + + + + +@deftypefun {int} {gnutls_privkey_sign_data} (gnutls_privkey_t @var{signer}, gnutls_digest_algorithm_t @var{hash}, unsigned int @var{flags}, const gnutls_datum_t * @var{data}, gnutls_datum_t * @var{signature}) +@var{signer}: Holds the key + +@var{hash}: should be a digest algorithm + +@var{flags}: Zero or one of @code{gnutls_privkey_flags_t} + +@var{data}: holds the data to be signed + +@var{signature}: will contain the signature allocated with @code{gnutls_malloc()} + +This function will sign the given data using a signature algorithm +supported by the private key. Signature algorithms are always used +together with a hash functions. Different hash functions may be +used for the RSA algorithm, but only the SHA family for the DSA keys. + +You may use @code{gnutls_pubkey_get_preferred_hash_algorithm()} to determine +the hash algorithm. + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. + +@strong{Since:} 2.12.0 +@end deftypefun |