Files
GopherGate/target/doc/openssl/cipher_ctx/struct.CipherCtx.html
2026-02-26 12:00:21 -05:00

205 lines
71 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A context object used to perform symmetric encryption operations."><title>CipherCtx in openssl::cipher_ctx - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="openssl" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">CipherCtx</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.75</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Cipher<wbr>Ctx</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new" title="new">new</a></li></ul><h3><a href="#deref-methods-CipherCtxRef">Methods from Deref&lt;<wbr>Target=<wbr>Cipher<wbr>CtxRef&gt;</a></h3><ul class="block deref-methods"><li><a href="#method.block_size" title="block_size">block_size</a></li><li><a href="#method.cipher_final" title="cipher_final">cipher_final</a></li><li><a href="#method.cipher_final_unchecked" title="cipher_final_unchecked">cipher_final_unchecked</a></li><li><a href="#method.cipher_final_vec" title="cipher_final_vec">cipher_final_vec</a></li><li><a href="#method.cipher_update" title="cipher_update">cipher_update</a></li><li><a href="#method.cipher_update_inplace" title="cipher_update_inplace">cipher_update_inplace</a></li><li><a href="#method.cipher_update_unchecked" title="cipher_update_unchecked">cipher_update_unchecked</a></li><li><a href="#method.cipher_update_vec" title="cipher_update_vec">cipher_update_vec</a></li><li><a href="#method.copy" title="copy">copy</a></li><li><a href="#method.decrypt_init" title="decrypt_init">decrypt_init</a></li><li><a href="#method.encrypt_init" title="encrypt_init">encrypt_init</a></li><li><a href="#method.iv_length" title="iv_length">iv_length</a></li><li><a href="#method.key_length" title="key_length">key_length</a></li><li><a href="#method.num" title="num">num</a></li><li><a href="#method.open_init" title="open_init">open_init</a></li><li><a href="#method.rand_key" title="rand_key">rand_key</a></li><li><a href="#method.seal_init" title="seal_init">seal_init</a></li><li><a href="#method.set_data_len" title="set_data_len">set_data_len</a></li><li><a href="#method.set_flags" title="set_flags">set_flags</a></li><li><a href="#method.set_iv_length" title="set_iv_length">set_iv_length</a></li><li><a href="#method.set_key_length" title="set_key_length">set_key_length</a></li><li><a href="#method.set_padding" title="set_padding">set_padding</a></li><li><a href="#method.set_tag" title="set_tag">set_tag</a></li><li><a href="#method.set_tag_length" title="set_tag_length">set_tag_length</a></li><li><a href="#method.tag" title="tag">tag</a></li><li><a href="#method.tag_length" title="tag_length">tag_length</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsRef%3CCipherCtxRef%3E-for-CipherCtx" title="AsRef&#60;CipherCtxRef&#62;">AsRef&#60;CipherCtxRef&#62;</a></li><li><a href="#impl-Borrow%3CCipherCtxRef%3E-for-CipherCtx" title="Borrow&#60;CipherCtxRef&#62;">Borrow&#60;CipherCtxRef&#62;</a></li><li><a href="#impl-Deref-for-CipherCtx" title="Deref">Deref</a></li><li><a href="#impl-DerefMut-for-CipherCtx" title="DerefMut">DerefMut</a></li><li><a href="#impl-Drop-for-CipherCtx" title="Drop">Drop</a></li><li><a href="#impl-ForeignType-for-CipherCtx" title="ForeignType">ForeignType</a></li><li><a href="#impl-Send-for-CipherCtx" title="Send">Send</a></li><li><a href="#impl-Sync-for-CipherCtx" title="Sync">Sync</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-CipherCtx" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-CipherCtx" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-CipherCtx" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CipherCtx" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-Receiver-for-P" title="Receiver">Receiver</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>cipher_<wbr>ctx</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">cipher_ctx</a></div><h1>Struct <span class="struct">Cipher<wbr>Ctx</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a> </span></div><pre class="rust item-decl"><code>pub struct CipherCtx(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A context object used to perform symmetric encryption operations.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#94-105">Source</a><a href="#impl-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#97-104">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new context.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_new.html"><code>EVP_CIPHER_CTX_new</code></a>.</p>
</div></details></div></details></div><details class="toggle big-toggle" open><summary><h2 id="deref-methods-CipherCtxRef" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = <a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a>&gt;</span><a href="#deref-methods-CipherCtxRef" class="anchor">§</a></h2></summary><div id="deref-methods-CipherCtxRef-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.copy" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#109-114">Source</a><h4 class="code-header">pub fn <a href="#method.copy" class="fn">copy</a>(&amp;mut self, src: &amp;<a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_copy.html"><code>EVP_CIPHER_CTX_copy</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.encrypt_init" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#127-134">Source</a><h4 class="code-header">pub fn <a href="#method.encrypt_init" class="fn">encrypt_init</a>(
&amp;mut self,
type_: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../cipher/struct.CipherRef.html" title="struct openssl::cipher::CipherRef">CipherRef</a>&gt;,
key: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
iv: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Initializes the context for encryption.</p>
<p>Normally this is called once to set all of the cipher, key, and IV. However, this process can be split up
by first setting the cipher with no key or IV and then setting the key and IV with no cipher. This can be used
to, for example, use a nonstandard IV size.</p>
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
<p>Panics if the key buffer is smaller than the key size of the cipher, the IV buffer is smaller than the IV size
of the cipher, or if a key or IV is provided before a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_EncryptInit_ex.html"><code>EVP_EncryptInit_ex</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.decrypt_init" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#147-154">Source</a><h4 class="code-header">pub fn <a href="#method.decrypt_init" class="fn">decrypt_init</a>(
&amp;mut self,
type_: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../cipher/struct.CipherRef.html" title="struct openssl::cipher::CipherRef">CipherRef</a>&gt;,
key: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
iv: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Initializes the context for decryption.</p>
<p>Normally this is called once to set all of the cipher, key, and IV. However, this process can be split up
by first setting the cipher with no key or IV and then setting the key and IV with no cipher. This can be used
to, for example, use a nonstandard IV size.</p>
<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5>
<p>Panics if the key buffer is smaller than the key size of the cipher, the IV buffer is smaller than the IV size
of the cipher, or if a key or IV is provided before a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_DecryptInit_ex.html"><code>EVP_DecryptInit_ex</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.seal_init" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#206-250">Source</a><h4 class="code-header">pub fn <a href="#method.seal_init" class="fn">seal_init</a>&lt;T&gt;(
&amp;mut self,
type_: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../cipher/struct.CipherRef.html" title="struct openssl::cipher::CipherRef">CipherRef</a>&gt;,
pub_keys: &amp;[<a class="struct" href="../pkey/struct.PKey.html" title="struct openssl::pkey::PKey">PKey</a>&lt;T&gt;],
encrypted_keys: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>&gt;],
iv: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
T: <a class="trait" href="../pkey/trait.HasPublic.html" title="trait openssl::pkey::HasPublic">HasPublic</a>,</div></h4></section></summary><div class="docblock"><p>Initializes the context to perform envelope encryption.</p>
<p>Normally this is called once to set both the cipher and public keys. However, this process may be split up by
first providing the cipher with no public keys and then setting the public keys with no cipher.</p>
<p><code>encrypted_keys</code> will contain the generated symmetric key encrypted with each corresponding asymmetric private
key. The generated IV will be written to <code>iv</code>.</p>
<h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5>
<p>Panics if <code>pub_keys</code> is not the same size as <code>encrypted_keys</code>, the IV buffer is smaller than the ciphers IV
size, or if an IV is provided before the cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_SealInit.html"><code>EVP_SealInit</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_init" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#263-291">Source</a><h4 class="code-header">pub fn <a href="#method.open_init" class="fn">open_init</a>&lt;T&gt;(
&amp;mut self,
type_: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../cipher/struct.CipherRef.html" title="struct openssl::cipher::CipherRef">CipherRef</a>&gt;,
encrypted_key: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>],
iv: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
priv_key: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../pkey/struct.PKeyRef.html" title="struct openssl::pkey::PKeyRef">PKeyRef</a>&lt;T&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
T: <a class="trait" href="../pkey/trait.HasPrivate.html" title="trait openssl::pkey::HasPrivate">HasPrivate</a>,</div></h4></section></summary><div class="docblock"><p>Initializes the context to perform envelope decryption.</p>
<p>Normally this is called once with all of the arguments present. However, this process may be split up by first
providing the cipher alone and then after providing the rest of the arguments in a second call.</p>
<h5 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h5>
<p>Panics if the IV buffer is smaller than the ciphers required IV size or if the IV is provided before the
cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_OpenInit.html"><code>EVP_OpenInit</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.block_size" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#307-311">Source</a><h4 class="code-header">pub fn <a href="#method.block_size" class="fn">block_size</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the block size of the contexts cipher.</p>
<p>Stream ciphers will report a block size of 1.</p>
<h5 id="panics-4"><a class="doc-anchor" href="#panics-4">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_block_size.html"><code>EVP_CIPHER_CTX_block_size</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.key_length" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#319-323">Source</a><h4 class="code-header">pub fn <a href="#method.key_length" class="fn">key_length</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the key length of the contexts cipher.</p>
<h5 id="panics-5"><a class="doc-anchor" href="#panics-5">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_key_length.html"><code>EVP_CIPHER_CTX_key_length</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rand_key" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#333-344">Source</a><h4 class="code-header">pub fn <a href="#method.rand_key" class="fn">rand_key</a>(&amp;self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Generates a random key based on the configured cipher.</p>
<h5 id="panics-6"><a class="doc-anchor" href="#panics-6">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher or if the buffer is smaller than the ciphers key
length.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_rand_key.html"><code>EVP_CIPHER_CTX_rand_key</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_key_length" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#354-365">Source</a><h4 class="code-header">pub fn <a href="#method.set_key_length" class="fn">set_key_length</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the length of the key expected by the context.</p>
<p>Only some ciphers support configurable key lengths.</p>
<h5 id="panics-7"><a class="doc-anchor" href="#panics-7">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_set_key_length.html"><code>EVP_CIPHER_CTX_set_key_length</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.iv_length" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#375-379">Source</a><h4 class="code-header">pub fn <a href="#method.iv_length" class="fn">iv_length</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the length of the IV expected by this context.</p>
<p>Returns 0 if the cipher does not use an IV.</p>
<h5 id="panics-8"><a class="doc-anchor" href="#panics-8">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_iv_length.html"><code>EVP_CIPHER_CTX_iv_length</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.num" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#391-395">Source</a><h4 class="code-header">pub fn <a href="#method.num" class="fn">num</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the <code>num</code> parameter of the cipher.</p>
<p>Built-in ciphers typically use this to track how much of the
current underlying block has been “used” already.</p>
<h5 id="panics-9"><a class="doc-anchor" href="#panics-9">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_num.html"><code>EVP_CIPHER_CTX_num</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_iv_length" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#405-420">Source</a><h4 class="code-header">pub fn <a href="#method.set_iv_length" class="fn">set_iv_length</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the length of the IV expected by this context.</p>
<p>Only some ciphers support configurable IV lengths.</p>
<h5 id="panics-10"><a class="doc-anchor" href="#panics-10">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_ctrl.html"><code>EVP_CIPHER_CTX_ctrl</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_length" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#433-437">Source</a><h4 class="code-header">pub fn <a href="#method.tag_length" class="fn">tag_length</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the length of the authentication tag expected by this context.</p>
<p>Returns 0 if the cipher is not authenticated.</p>
<h5 id="panics-11"><a class="doc-anchor" href="#panics-11">§</a>Panics</h5>
<p>Panics if the context has not been initialized with a cipher.</p>
<p>Requires OpenSSL 3.0.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_get_tag_length.html"><code>EVP_CIPHER_CTX_get_tag_length</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#446-459">Source</a><h4 class="code-header">pub fn <a href="#method.tag" class="fn">tag</a>(&amp;self, tag: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieves the calculated authentication tag from the context.</p>
<p>This should be called after <a href="struct.CipherCtxRef.html#method.cipher_final" title="method openssl::cipher_ctx::CipherCtxRef::cipher_final"><code>Self::cipher_final</code></a>, and is only supported by authenticated ciphers.</p>
<p>The size of the buffer indicates the size of the tag. While some ciphers support a range of tag sizes, it is
recommended to pick the maximum size.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_ctrl.html"><code>EVP_CIPHER_CTX_ctrl</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_tag_length" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#465-478">Source</a><h4 class="code-header">pub fn <a href="#method.set_tag_length" class="fn">set_tag_length</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the length of the generated authentication tag.</p>
<p>This must be called when encrypting with a cipher in CCM mode to use a tag size other than the default.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_ctrl.html"><code>EVP_CIPHER_CTX_ctrl</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_tag" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#482-495">Source</a><h4 class="code-header">pub fn <a href="#method.set_tag" class="fn">set_tag</a>(&amp;mut self, tag: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the authentication tag for verification during decryption.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_ctrl.html"><code>EVP_CIPHER_CTX_ctrl</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_padding" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#501-505">Source</a><h4 class="code-header">pub fn <a href="#method.set_padding" class="fn">set_padding</a>(&amp;mut self, padding: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Enables or disables padding.</p>
<p>If padding is disabled, the plaintext must be an exact multiple of the ciphers block size.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_set_padding.html"><code>EVP_CIPHER_CTX_set_padding</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_data_len" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#511-525">Source</a><h4 class="code-header">pub fn <a href="#method.set_data_len" class="fn">set_data_len</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the total length of plaintext data.</p>
<p>This is required for ciphers operating in CCM mode.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CipherUpdate.html"><code>EVP_CipherUpdate</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_flags" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#532-536">Source</a><h4 class="code-header">pub fn <a href="#method.set_flags" class="fn">set_flags</a>(&amp;mut self, flags: <a class="struct" href="struct.CipherCtxFlags.html" title="struct openssl::cipher_ctx::CipherCtxFlags">CipherCtxFlags</a>)</h4></section></summary><div class="docblock"><p>Set ctx flags.</p>
<p>This function is currently used to enable AES key wrap feature supported by OpenSSL 1.0.2 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_set_flags.html"><code>EVP_CIPHER_CTX_set_flags</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_update" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#549-568">Source</a><h4 class="code-header">pub fn <a href="#method.cipher_update" class="fn">cipher_update</a>(
&amp;mut self,
input: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>],
output: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Writes data into the context.</p>
<p>Providing no output buffer will cause the input to be considered additional authenticated data (AAD).</p>
<p>Returns the number of bytes written to <code>output</code>.</p>
<h5 id="panics-12"><a class="doc-anchor" href="#panics-12">§</a>Panics</h5>
<p>Panics if <code>output</code> doesnt contain enough space for data to be
written.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CipherUpdate.html"><code>EVP_CipherUpdate</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_update_unchecked" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#588-606">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.cipher_update_unchecked" class="fn">cipher_update_unchecked</a>(
&amp;mut self,
input: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>],
output: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Writes data into the context.</p>
<p>Providing no output buffer will cause the input to be considered additional authenticated data (AAD).</p>
<p>Returns the number of bytes written to <code>output</code>.</p>
<p>This function is the same as <a href="struct.CipherCtxRef.html#method.cipher_update" title="method openssl::cipher_ctx::CipherCtxRef::cipher_update"><code>Self::cipher_update</code></a> but with the
output size check removed. It can be used when the exact
buffer size control is maintained by the caller.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>The caller is expected to provide <code>output</code> buffer
large enough to contain correct number of bytes. For streaming
ciphers the output buffer size should be at least as big as
the input buffer. For block ciphers the size of the output
buffer depends on the state of partially updated blocks.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CipherUpdate.html"><code>EVP_CipherUpdate</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_update_vec" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#609-620">Source</a><h4 class="code-header">pub fn <a href="#method.cipher_update_vec" class="fn">cipher_update_vec</a>(
&amp;mut self,
input: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>],
output: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.CipherCtxRef.html#method.cipher_update" title="method openssl::cipher_ctx::CipherCtxRef::cipher_update"><code>Self::cipher_update</code></a> except that it appends output to a <a href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec"><code>Vec</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_update_inplace" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#636-664">Source</a><h4 class="code-header">pub fn <a href="#method.cipher_update_inplace" class="fn">cipher_update_inplace</a>(
&amp;mut self,
data: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>],
inlen: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.CipherCtxRef.html#method.cipher_update" title="method openssl::cipher_ctx::CipherCtxRef::cipher_update"><code>Self::cipher_update</code></a> except that it writes output into the
<code>data</code> buffer. The <code>inlen</code> parameter specifies the number of bytes in
<code>data</code> that are considered the input. For streaming ciphers, the size of
<code>data</code> must be at least the input size. Otherwise, it must be at least
an additional block size larger.</p>
<p>Note: Use <a href="struct.CipherCtxRef.html#method.cipher_update" title="method openssl::cipher_ctx::CipherCtxRef::cipher_update"><code>Self::cipher_update</code></a> with no output argument to write AAD.</p>
<h5 id="panics-13"><a class="doc-anchor" href="#panics-13">§</a>Panics</h5>
<p>This function panics if the input size cannot be represented as <code>int</code> or
exceeds the buffer size, or if the output buffer does not contain enough
additional space.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CipherUpdate.html"><code>EVP_CipherUpdate</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_final" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#676-683">Source</a><h4 class="code-header">pub fn <a href="#method.cipher_final" class="fn">cipher_final</a>(&amp;mut self, output: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Finalizes the encryption or decryption process.</p>
<p>Any remaining data will be written to the output buffer.</p>
<p>Returns the number of bytes written to <code>output</code>.</p>
<h5 id="panics-14"><a class="doc-anchor" href="#panics-14">§</a>Panics</h5>
<p>Panics if <code>output</code> is smaller than the ciphers block size.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CipherFinal.html"><code>EVP_CipherFinal</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_final_unchecked" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#701-714">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.cipher_final_unchecked" class="fn">cipher_final_unchecked</a>(
&amp;mut self,
output: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Finalizes the encryption or decryption process.</p>
<p>Any remaining data will be written to the output buffer.</p>
<p>Returns the number of bytes written to <code>output</code>.</p>
<p>This function is the same as <a href="struct.CipherCtxRef.html#method.cipher_final" title="method openssl::cipher_ctx::CipherCtxRef::cipher_final"><code>Self::cipher_final</code></a> but with
the output buffer size check removed.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>The caller is expected to provide <code>output</code> buffer
large enough to contain correct number of bytes. For streaming
ciphers the output buffer can be empty, for block ciphers the
output buffer should be at least as big as the block.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_CipherFinal.html"><code>EVP_CipherFinal</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cipher_final_vec" class="method"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#717-724">Source</a><h4 class="code-header">pub fn <a href="#method.cipher_final_vec" class="fn">cipher_final_vec</a>(
&amp;mut self,
output: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.CipherCtxRef.html#method.cipher_final" title="method openssl::cipher_ctx::CipherCtxRef::cipher_final"><code>Self::cipher_final</code></a> except that it appends output to a <a href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec"><code>Vec</code></a>.</p>
</div></details></div></details><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CCipherCtxRef%3E-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-AsRef%3CCipherCtxRef%3E-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a>&gt; for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CCipherCtxRef%3E-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-Borrow%3CCipherCtxRef%3E-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;<a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a>&gt; for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-Deref-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-DerefMut-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-Drop-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.93.1/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ForeignType-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-ForeignType-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../../foreign_types_shared/trait.ForeignType.html" title="trait foreign_types_shared::ForeignType">ForeignType</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.CType" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#associatedtype.CType" class="anchor">§</a><h4 class="code-header">type <a href="../../foreign_types_shared/trait.ForeignType.html#associatedtype.CType" class="associatedtype">CType</a> = <a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.EVP_CIPHER_CTX.html" title="enum openssl_sys::openssl::handwritten::types::EVP_CIPHER_CTX">EVP_CIPHER_CTX</a></h4></section></summary><div class='docblock'>The raw C type.</div></details><details class="toggle" open><summary><section id="associatedtype.Ref" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#associatedtype.Ref" class="anchor">§</a><h4 class="code-header">type <a href="../../foreign_types_shared/trait.ForeignType.html#associatedtype.Ref" class="associatedtype">Ref</a> = <a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">CipherCtxRef</a></h4></section></summary><div class='docblock'>The type representing a reference to this type.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_ptr" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.from_ptr" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../../foreign_types_shared/trait.ForeignType.html#tymethod.from_ptr" class="fn">from_ptr</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.pointer.html">*mut </a><a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.EVP_CIPHER_CTX.html" title="enum openssl_sys::openssl::handwritten::types::EVP_CIPHER_CTX">EVP_CIPHER_CTX</a>) -&gt; <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h4></section></summary><div class='docblock'>Constructs an instance of this type from its raw type.</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr" class="method trait-impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#method.as_ptr" class="anchor">§</a><h4 class="code-header">fn <a href="../../foreign_types_shared/trait.ForeignType.html#tymethod.as_ptr" class="fn">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.pointer.html">*mut </a><a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.EVP_CIPHER_CTX.html" title="enum openssl_sys::openssl::handwritten::types::EVP_CIPHER_CTX">EVP_CIPHER_CTX</a></h4></section></summary><div class='docblock'>Returns a raw pointer to the wrapped value.</div></details></div></details><section id="impl-Send-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-Send-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section><section id="impl-Sync-for-CipherCtx" class="impl"><a class="src rightside" href="../../src/openssl/cipher_ctx.rs.html#75-83">Source</a><a href="#impl-Sync-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-CipherCtx" class="impl"><a href="#impl-Freeze-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section><section id="impl-RefUnwindSafe-for-CipherCtx" class="impl"><a href="#impl-RefUnwindSafe-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section><section id="impl-Unpin-for-CipherCtx" class="impl"><a href="#impl-Unpin-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section><section id="impl-UnwindSafe-for-CipherCtx" class="impl"><a href="#impl-UnwindSafe-for-CipherCtx" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">CipherCtx</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Receiver-for-P" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/ops/deref.rs.html#378-380">Source</a><a href="#impl-Receiver-for-P" class="anchor">§</a><h3 class="code-header">impl&lt;P, T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Receiver.html" title="trait core::ops::deref::Receiver">Receiver</a> for P<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = T&gt; + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/ops/deref.rs.html#382">Source</a><a href="#associatedtype.Target-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Receiver.html#associatedtype.Target" class="associatedtype">Target</a> = T</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>arbitrary_self_types</code>)</span></div></span><div class='docblock'>The target type on which the method may be called.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>