summaryrefslogtreecommitdiffstats
path: root/doc/functions/gnutls_cipher_encrypt3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/functions/gnutls_cipher_encrypt3')
-rw-r--r--doc/functions/gnutls_cipher_encrypt333
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/functions/gnutls_cipher_encrypt3 b/doc/functions/gnutls_cipher_encrypt3
new file mode 100644
index 0000000..fc3a45c
--- /dev/null
+++ b/doc/functions/gnutls_cipher_encrypt3
@@ -0,0 +1,33 @@
+
+
+
+
+@deftypefun {int} {gnutls_cipher_encrypt3} (gnutls_cipher_hd_t @var{handle}, const void * @var{ptext}, size_t @var{ptext_len}, void * @var{ctext}, size_t * @var{ctext_len}, unsigned @var{flags})
+@var{handle}: is a @code{gnutls_cipher_hd_t} type
+
+@var{ptext}: the data to encrypt
+
+@var{ptext_len}: the length of data to encrypt
+
+@var{ctext}: the encrypted data
+
+@var{ctext_len}: the length of encrypted data (initially must hold the maximum available size)
+
+@var{flags}: flags for padding
+
+This function will encrypt the given data using the algorithm
+specified by the context. For block ciphers, @code{ptext_len} is
+typically a multiple of the block size. If not, the caller can
+instruct the function to pad the last block according to @code{flags} .
+Currently, the only available padding scheme is
+@code{GNUTLS_CIPHER_PADDING_PKCS7} .
+
+If @code{ctext} is not @code{NULL} , it must hold enough space to store
+resulting cipher text. To check the required size, this function
+can be called with @code{ctext} set to @code{NULL} . Then @code{ctext_len} will be
+updated without performing actual encryption.
+
+@strong{Returns:} Zero or a negative error code on error.
+
+@strong{Since:} 3.7.7
+@end deftypefun