mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-17 16:29:50 +00:00
deploy: de38ae62916547ad097c066f94a32e9ba7790eeb
This commit is contained in:
commit
9a86359447
28502 changed files with 1261284 additions and 0 deletions
20
openssl/aes/fn.aes_ige.html
Normal file
20
openssl/aes/fn.aes_ige.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!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="Performs AES IGE encryption or decryption"><title>aes_ige in openssl::aes - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">aes_ige</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#panics" title="Panics">Panics</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>aes</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">aes</a></span><h1>Function <span class="fn">aes_ige</span><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/aes.rs.html#161-180">Source</a> </span></div><pre class="rust item-decl"><code>pub fn aes_ige(
|
||||
in_: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
out: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
key: &<a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a>,
|
||||
iv: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
mode: <a class="enum" href="../symm/enum.Mode.html" title="enum openssl::symm::Mode">Mode</a>,
|
||||
)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Performs AES IGE encryption or decryption</p>
|
||||
<p>AES IGE (Infinite Garble Extension) is a form of AES block cipher utilized in
|
||||
OpenSSL. Infinite Garble refers to propagating forward errors. IGE, like other
|
||||
block ciphers implemented for AES requires an initialization vector. The IGE mode
|
||||
allows a stream of blocks to be encrypted or decrypted without having the entire
|
||||
plaintext available. For more information, visit <a href="http://www.links.org/files/openssl-ige.pdf">AES IGE Encryption</a>.</p>
|
||||
<p>This block cipher uses 16 byte blocks. The rust implementation will panic
|
||||
if the input or output does not meet this 16-byte boundary. Attention must
|
||||
be made in this low level implementation to pad the value to the 128-bit boundary.</p>
|
||||
<h2 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h2>
|
||||
<p>Panics if <code>in_</code> is not the same length as <code>out</code>, if that length is not a multiple of 16, or if
|
||||
<code>iv</code> is not at least 32 bytes.</p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/AES_ige_encrypt.html"><code>AES_ige_encrypt</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
18
openssl/aes/fn.unwrap_key.html
Normal file
18
openssl/aes/fn.unwrap_key.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!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="Unwrap a key, according to RFC 3394"><title>unwrap_key in openssl::aes - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">unwrap_<wbr>key</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#panics" title="Panics">Panics</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>aes</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">aes</a></span><h1>Function <span class="fn">unwrap_key</span><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/aes.rs.html#235-259">Source</a> </span></div><pre class="rust item-decl"><code>pub fn unwrap_key(
|
||||
key: &<a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a>,
|
||||
iv: <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.array.html">8</a>]>,
|
||||
out: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
in_: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Unwrap a key, according to <a href="https://tools.ietf.org/html/rfc3394">RFC 3394</a></p>
|
||||
<ul>
|
||||
<li><code>key</code>: The key-encrypting-key to decrypt the wrapped key. Must be a decrypting key</li>
|
||||
<li><code>iv</code>: The same IV used for wrapping the key</li>
|
||||
<li><code>out</code>: The buffer to write the unwrapped key to</li>
|
||||
<li><code>in_</code>: The input ciphertext</li>
|
||||
</ul>
|
||||
<p>Returns the number of bytes written into <code>out</code></p>
|
||||
<h2 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h2>
|
||||
<p>Panics if either <code>out</code> or <code>in_</code> do not have sizes that are a multiple of 8, or
|
||||
if <code>in_</code> is not 8 bytes longer than <code>out</code></p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/AES_unwrap_key.html"><code>AES_unwrap_key</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
18
openssl/aes/fn.wrap_key.html
Normal file
18
openssl/aes/fn.wrap_key.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!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="Wrap a key, according to RFC 3394"><title>wrap_key in openssl::aes - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">wrap_<wbr>key</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#panics" title="Panics">Panics</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>aes</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">aes</a></span><h1>Function <span class="fn">wrap_key</span><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/aes.rs.html#196-219">Source</a> </span></div><pre class="rust item-decl"><code>pub fn wrap_key(
|
||||
key: &<a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a>,
|
||||
iv: <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.array.html">8</a>]>,
|
||||
out: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
in_: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrap a key, according to <a href="https://tools.ietf.org/html/rfc3394">RFC 3394</a></p>
|
||||
<ul>
|
||||
<li><code>key</code>: The key-encrypting-key to use. Must be a encrypting key</li>
|
||||
<li><code>iv</code>: The IV to use. You must use the same IV for both wrapping and unwrapping</li>
|
||||
<li><code>out</code>: The output buffer to store the ciphertext</li>
|
||||
<li><code>in_</code>: The input buffer, storing the key to be wrapped</li>
|
||||
</ul>
|
||||
<p>Returns the number of bytes written into <code>out</code></p>
|
||||
<h2 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h2>
|
||||
<p>Panics if either <code>out</code> or <code>in_</code> do not have sizes that are a multiple of 8, or if
|
||||
<code>out</code> is not 8 bytes longer than <code>in_</code></p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/AES_wrap_key.html"><code>AES_wrap_key</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
41
openssl/aes/index.html
Normal file
41
openssl/aes/index.html
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!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="Low level AES IGE and key wrapping functionality"><title>openssl::aes - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module aes</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a><ul><li><a href="#aes-ige" title="AES IGE">AES IGE</a></li><li><a href="#key-wrapping" title="Key wrapping">Key wrapping</a></li></ul></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>aes</span><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/aes.rs.html#1-319">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Low level AES IGE and key wrapping functionality</p>
|
||||
<p>AES ECB, CBC, XTS, CTR, CFB, GCM and other conventional symmetric encryption
|
||||
modes are found in <a href="../symm/index.html"><code>symm</code></a>. This is the implementation of AES IGE and key wrapping</p>
|
||||
<p>Advanced Encryption Standard (AES) provides symmetric key cipher that
|
||||
the same key is used to encrypt and decrypt data. This implementation
|
||||
uses 128, 192, or 256 bit keys. This module provides functions to
|
||||
create a new key with <a href="struct.AesKey.html#method.new_encrypt"><code>new_encrypt</code></a> and perform an encryption/decryption
|
||||
using that key with <a href="fn.aes_ige.html"><code>aes_ige</code></a>.</p>
|
||||
<p>The <a href="../symm/index.html"><code>symm</code></a> module should be used in preference to this module in most cases.
|
||||
The IGE block cipher is a non-traditional cipher mode. More traditional AES
|
||||
encryption methods are found in the <a href="../symm/struct.Crypter.html"><code>Crypter</code></a> and <a href="../symm/struct.Cipher.html"><code>Cipher</code></a> structs.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>\</p>
|
||||
<h3 id="aes-ige"><a class="doc-anchor" href="#aes-ige">§</a>AES IGE</h3>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::aes::{AesKey, aes_ige};
|
||||
<span class="kw">use </span>openssl::symm::Mode;
|
||||
|
||||
<span class="kw">let </span>key = <span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"</span>;
|
||||
<span class="kw">let </span>plaintext = <span class="string">b"\x12\x34\x56\x78\x90\x12\x34\x56\x12\x34\x56\x78\x90\x12\x34\x56"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>iv = <span class="kw-2">*</span><span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\
|
||||
\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"</span>;
|
||||
|
||||
<span class="kw">let </span>key = AesKey::new_encrypt(key).unwrap();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>output = [<span class="number">0u8</span>; <span class="number">16</span>];
|
||||
aes_ige(plaintext, <span class="kw-2">&mut </span>output, <span class="kw-2">&</span>key, <span class="kw-2">&mut </span>iv, Mode::Encrypt);
|
||||
<span class="macro">assert_eq!</span>(output, <span class="kw-2">*</span><span class="string">b"\xa6\xad\x97\x4d\x5c\xea\x1d\x36\xd2\xf3\x67\x98\x09\x07\xed\x32"</span>);</code></pre></div>
|
||||
<h3 id="key-wrapping"><a class="doc-anchor" href="#key-wrapping">§</a>Key wrapping</h3>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::aes::{AesKey, unwrap_key, wrap_key};
|
||||
|
||||
<span class="kw">let </span>kek = <span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"</span>;
|
||||
<span class="kw">let </span>key_to_wrap = <span class="string">b"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF"</span>;
|
||||
|
||||
<span class="kw">let </span>enc_key = AesKey::new_encrypt(kek).unwrap();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>ciphertext = [<span class="number">0u8</span>; <span class="number">24</span>];
|
||||
wrap_key(<span class="kw-2">&</span>enc_key, <span class="prelude-val">None</span>, <span class="kw-2">&mut </span>ciphertext, <span class="kw-2">&</span>key_to_wrap[..]).unwrap();
|
||||
<span class="kw">let </span>dec_key = AesKey::new_decrypt(kek).unwrap();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>orig_key = [<span class="number">0u8</span>; <span class="number">16</span>];
|
||||
unwrap_key(<span class="kw-2">&</span>dec_key, <span class="prelude-val">None</span>, <span class="kw-2">&mut </span>orig_key, <span class="kw-2">&</span>ciphertext[..]).unwrap();
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>orig_key[..], <span class="kw-2">&</span>key_to_wrap[..]);</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></div><div class="desc docblock-short">The key used to encrypt or decrypt cipher blocks.</div></li><li><div class="item-name"><a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></div><div class="desc docblock-short">Provides Error handling for parsing keys.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.aes_ige.html" title="fn openssl::aes::aes_ige">aes_ige</a></div><div class="desc docblock-short">Performs AES IGE encryption or decryption</div></li><li><div class="item-name"><a class="fn" href="fn.unwrap_key.html" title="fn openssl::aes::unwrap_key">unwrap_<wbr>key</a></div><div class="desc docblock-short">Unwrap a key, according to <a href="https://tools.ietf.org/html/rfc3394">RFC 3394</a></div></li><li><div class="item-name"><a class="fn" href="fn.wrap_key.html" title="fn openssl::aes::wrap_key">wrap_<wbr>key</a></div><div class="desc docblock-short">Wrap a key, according to <a href="https://tools.ietf.org/html/rfc3394">RFC 3394</a></div></li></ul></section></div></main></body></html>
|
||||
1
openssl/aes/sidebar-items.js
Normal file
1
openssl/aes/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["aes_ige","unwrap_key","wrap_key"],"struct":["AesKey","KeyError"]};
|
||||
20
openssl/aes/struct.AesKey.html
Normal file
20
openssl/aes/struct.AesKey.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!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="The key used to encrypt or decrypt cipher blocks."><title>AesKey in openssl::aes - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">AesKey</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new_decrypt" title="new_decrypt">new_decrypt</a></li><li><a href="#method.new_encrypt" title="new_encrypt">new_encrypt</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-AesKey" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-AesKey" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-AesKey" title="Send">Send</a></li><li><a href="#impl-Sync-for-AesKey" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-AesKey" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-AesKey" 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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>aes</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">aes</a></span><h1>Struct <span class="struct">AesKey</span><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/aes.rs.html#77">Source</a> </span></div><pre class="rust item-decl"><code>pub struct AesKey(<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>The key used to encrypt or decrypt cipher blocks.</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-AesKey" class="impl"><a class="src rightside" href="../../src/openssl/aes.rs.html#89-138">Source</a><a href="#impl-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new_encrypt" class="method"><a class="src rightside" href="../../src/openssl/aes.rs.html#96-112">Source</a><h4 class="code-header">pub fn <a href="#method.new_encrypt" class="fn">new_encrypt</a>(key: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a>, <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a>></h4></section></summary><div class="docblock"><p>Prepares a key for encryption.</p>
|
||||
<h5 id="failure"><a class="doc-anchor" href="#failure">§</a>Failure</h5>
|
||||
<p>Returns an error if the key is not 128, 192, or 256 bits.</p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/AES_set_encrypt_key.html"><code>AES_set_encrypt_key</code></a>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.new_decrypt" class="method"><a class="src rightside" href="../../src/openssl/aes.rs.html#120-137">Source</a><h4 class="code-header">pub fn <a href="#method.new_decrypt" class="fn">new_decrypt</a>(key: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a>, <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a>></h4></section></summary><div class="docblock"><p>Prepares a key for decryption.</p>
|
||||
<h5 id="failure-1"><a class="doc-anchor" href="#failure-1">§</a>Failure</h5>
|
||||
<p>Returns an error if the key is not 128, 192, or 256 bits.</p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/AES_set_decrypt_key.html"><code>AES_set_decrypt_key</code></a>.</p>
|
||||
</div></details></div></details></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-AesKey" class="impl"><a href="#impl-Freeze-for-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></h3></section><section id="impl-RefUnwindSafe-for-AesKey" class="impl"><a href="#impl-RefUnwindSafe-for-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></h3></section><section id="impl-Send-for-AesKey" class="impl"><a href="#impl-Send-for-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></h3></section><section id="impl-Sync-for-AesKey" class="impl"><a href="#impl-Sync-for-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></h3></section><section id="impl-Unpin-for-AesKey" class="impl"><a href="#impl-Unpin-for-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</a></h3></section><section id="impl-UnwindSafe-for-AesKey" class="impl"><a href="#impl-UnwindSafe-for-AesKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.AesKey.html" title="struct openssl::aes::AesKey">AesKey</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.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> 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.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> 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.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||||
</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.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></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.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>
|
||||
12
openssl/aes/struct.KeyError.html
Normal file
12
openssl/aes/struct.KeyError.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!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="Provides Error handling for parsing keys."><title>KeyError in openssl::aes - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">KeyError</a></h2><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-KeyError" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-KeyError" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-KeyError" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-KeyError" title="Send">Send</a></li><li><a href="#impl-Sync-for-KeyError" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-KeyError" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-KeyError" 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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>aes</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">aes</a></span><h1>Struct <span class="struct">KeyError</span><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/aes.rs.html#74">Source</a> </span></div><pre class="rust item-decl"><code>pub struct KeyError(<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>Provides Error handling for parsing keys.</p>
|
||||
</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-Debug-for-KeyError" class="impl"><a class="src rightside" href="../../src/openssl/aes.rs.html#73">Source</a><a href="#impl-Debug-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/openssl/aes.rs.html#73">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></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-KeyError" class="impl"><a href="#impl-Freeze-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></h3></section><section id="impl-RefUnwindSafe-for-KeyError" class="impl"><a href="#impl-RefUnwindSafe-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></h3></section><section id="impl-Send-for-KeyError" class="impl"><a href="#impl-Send-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></h3></section><section id="impl-Sync-for-KeyError" class="impl"><a href="#impl-Sync-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></h3></section><section id="impl-Unpin-for-KeyError" class="impl"><a href="#impl-Unpin-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</a></h3></section><section id="impl-UnwindSafe-for-KeyError" class="impl"><a href="#impl-UnwindSafe-for-KeyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.KeyError.html" title="struct openssl::aes::KeyError">KeyError</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.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> 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.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> 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.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||||
</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.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></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.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>
|
||||
1
openssl/all.html
Normal file
1
openssl/all.html
Normal file
File diff suppressed because one or more lines are too long
15
openssl/asn1/index.html
Normal file
15
openssl/asn1/index.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<!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="Defines the format of certificates"><title>openssl::asn1 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module asn1</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>asn1</span><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/asn1.rs.html#1-910">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Defines the format of certificates</p>
|
||||
<p>This module is used by <a href="../x509/struct.X509Builder.html"><code>x509</code></a> and other certificate building functions
|
||||
to describe time, strings, and objects.</p>
|
||||
<p>Abstract Syntax Notation One is an interface description language.
|
||||
The specification comes from <a href="https://www.itu.int/rec/T-REC-X.208-198811-W/en">X.208</a> by OSI, and rewritten in X.680.
|
||||
ASN.1 describes properties of an object with a type set. Those types
|
||||
can be atomic, structured, choice, and other (CHOICE and ANY). These
|
||||
types are expressed as a number and the assignment operator ::= gives
|
||||
the type a name.</p>
|
||||
<p>The implementation here provides a subset of the ASN.1 types that OpenSSL
|
||||
uses, especially in the properties of a certificate used in HTTPS.</p>
|
||||
<h3 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h3>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::asn1::Asn1Time;
|
||||
<span class="kw">let </span>tomorrow = Asn1Time::days_from_now(<span class="number">1</span>);</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Asn1BitString.html" title="struct openssl::asn1::Asn1BitString">Asn1<wbr>BitString</a></div><div class="desc docblock-short">Sequence of bytes</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1BitStringRef.html" title="struct openssl::asn1::Asn1BitStringRef">Asn1<wbr>BitString<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.Asn1BitString.html" title="struct openssl::asn1::Asn1BitString"><code>Asn1BitString</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1Enumerated.html" title="struct openssl::asn1::Asn1Enumerated">Asn1<wbr>Enumerated</a></div><div class="desc docblock-short">An ASN.1 enumerated.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1EnumeratedRef.html" title="struct openssl::asn1::Asn1EnumeratedRef">Asn1<wbr>Enumerated<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.Asn1Enumerated.html" title="struct openssl::asn1::Asn1Enumerated"><code>Asn1Enumerated</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1GeneralizedTime.html" title="struct openssl::asn1::Asn1GeneralizedTime">Asn1<wbr>Generalized<wbr>Time</a></div><div class="desc docblock-short">Non-UTC representation of time</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1GeneralizedTimeRef.html" title="struct openssl::asn1::Asn1GeneralizedTimeRef">Asn1<wbr>Generalized<wbr>Time<wbr>Ref</a></div><div class="desc docblock-short">Reference to a <a href="struct.Asn1GeneralizedTime.html"><code>Asn1GeneralizedTime</code></a></div></li><li><div class="item-name"><a class="struct" href="struct.Asn1Integer.html" title="struct openssl::asn1::Asn1Integer">Asn1<wbr>Integer</a></div><div class="desc docblock-short">Numeric representation</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1IntegerRef.html" title="struct openssl::asn1::Asn1IntegerRef">Asn1<wbr>Integer<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.Asn1Integer.html" title="struct openssl::asn1::Asn1Integer"><code>Asn1Integer</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1Object.html" title="struct openssl::asn1::Asn1Object">Asn1<wbr>Object</a></div><div class="desc docblock-short">Object Identifier</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1ObjectRef.html" title="struct openssl::asn1::Asn1ObjectRef">Asn1<wbr>Object<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.Asn1Object.html" title="struct openssl::asn1::Asn1Object"><code>Asn1Object</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1OctetString.html" title="struct openssl::asn1::Asn1OctetString">Asn1<wbr>Octet<wbr>String</a></div><div class="desc docblock-short">ASN.1 OCTET STRING type</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1OctetStringRef.html" title="struct openssl::asn1::Asn1OctetStringRef">Asn1<wbr>Octet<wbr>String<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.Asn1OctetString.html" title="struct openssl::asn1::Asn1OctetString"><code>Asn1OctetString</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1String.html" title="struct openssl::asn1::Asn1String">Asn1<wbr>String</a></div><div class="desc docblock-short">Primary ASN.1 type used by OpenSSL</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1StringRef.html" title="struct openssl::asn1::Asn1StringRef">Asn1<wbr>String<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.Asn1String.html" title="struct openssl::asn1::Asn1String"><code>Asn1String</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1Time.html" title="struct openssl::asn1::Asn1Time">Asn1<wbr>Time</a></div><div class="desc docblock-short">Time storage and comparison</div></li><li><div class="item-name"><a class="struct" href="struct.Asn1TimeRef.html" title="struct openssl::asn1::Asn1TimeRef">Asn1<wbr>Time<wbr>Ref</a></div><div class="desc docblock-short">Reference to an <a href="struct.Asn1Time.html"><code>Asn1Time</code></a></div></li><li><div class="item-name"><a class="struct" href="struct.Asn1Type.html" title="struct openssl::asn1::Asn1Type">Asn1<wbr>Type</a></div><div class="desc docblock-short">The type of an ASN.1 value.</div></li><li><div class="item-name"><a class="struct" href="struct.TimeDiff.html" title="struct openssl::asn1::TimeDiff">Time<wbr>Diff</a></div><div class="desc docblock-short">Difference between two ASN1 times.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/asn1/sidebar-items.js
Normal file
1
openssl/asn1/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Asn1BitString","Asn1BitStringRef","Asn1Enumerated","Asn1EnumeratedRef","Asn1GeneralizedTime","Asn1GeneralizedTimeRef","Asn1Integer","Asn1IntegerRef","Asn1Object","Asn1ObjectRef","Asn1OctetString","Asn1OctetStringRef","Asn1String","Asn1StringRef","Asn1Time","Asn1TimeRef","Asn1Type","TimeDiff"]};
|
||||
21
openssl/asn1/struct.Asn1BitString.html
Normal file
21
openssl/asn1/struct.Asn1BitString.html
Normal file
File diff suppressed because one or more lines are too long
17
openssl/asn1/struct.Asn1BitStringRef.html
Normal file
17
openssl/asn1/struct.Asn1BitStringRef.html
Normal file
File diff suppressed because one or more lines are too long
16
openssl/asn1/struct.Asn1Enumerated.html
Normal file
16
openssl/asn1/struct.Asn1Enumerated.html
Normal file
File diff suppressed because one or more lines are too long
14
openssl/asn1/struct.Asn1EnumeratedRef.html
Normal file
14
openssl/asn1/struct.Asn1EnumeratedRef.html
Normal file
File diff suppressed because one or more lines are too long
20
openssl/asn1/struct.Asn1GeneralizedTime.html
Normal file
20
openssl/asn1/struct.Asn1GeneralizedTime.html
Normal file
File diff suppressed because one or more lines are too long
13
openssl/asn1/struct.Asn1GeneralizedTimeRef.html
Normal file
13
openssl/asn1/struct.Asn1GeneralizedTimeRef.html
Normal file
File diff suppressed because one or more lines are too long
34
openssl/asn1/struct.Asn1Integer.html
Normal file
34
openssl/asn1/struct.Asn1Integer.html
Normal file
File diff suppressed because one or more lines are too long
26
openssl/asn1/struct.Asn1IntegerRef.html
Normal file
26
openssl/asn1/struct.Asn1IntegerRef.html
Normal file
File diff suppressed because one or more lines are too long
29
openssl/asn1/struct.Asn1Object.html
Normal file
29
openssl/asn1/struct.Asn1Object.html
Normal file
File diff suppressed because one or more lines are too long
14
openssl/asn1/struct.Asn1ObjectRef.html
Normal file
14
openssl/asn1/struct.Asn1ObjectRef.html
Normal file
File diff suppressed because one or more lines are too long
20
openssl/asn1/struct.Asn1OctetString.html
Normal file
20
openssl/asn1/struct.Asn1OctetString.html
Normal file
File diff suppressed because one or more lines are too long
17
openssl/asn1/struct.Asn1OctetStringRef.html
Normal file
17
openssl/asn1/struct.Asn1OctetStringRef.html
Normal file
File diff suppressed because one or more lines are too long
29
openssl/asn1/struct.Asn1String.html
Normal file
29
openssl/asn1/struct.Asn1String.html
Normal file
File diff suppressed because one or more lines are too long
24
openssl/asn1/struct.Asn1StringRef.html
Normal file
24
openssl/asn1/struct.Asn1StringRef.html
Normal file
File diff suppressed because one or more lines are too long
51
openssl/asn1/struct.Asn1Time.html
Normal file
51
openssl/asn1/struct.Asn1Time.html
Normal file
File diff suppressed because one or more lines are too long
37
openssl/asn1/struct.Asn1TimeRef.html
Normal file
37
openssl/asn1/struct.Asn1TimeRef.html
Normal file
File diff suppressed because one or more lines are too long
17
openssl/asn1/struct.Asn1Type.html
Normal file
17
openssl/asn1/struct.Asn1Type.html
Normal file
File diff suppressed because one or more lines are too long
25
openssl/asn1/struct.TimeDiff.html
Normal file
25
openssl/asn1/struct.TimeDiff.html
Normal file
File diff suppressed because one or more lines are too long
5
openssl/base64/fn.decode_block.html
Normal file
5
openssl/base64/fn.decode_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<!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="Decodes a base64-encoded string to bytes."><title>decode_block in openssl::base64 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">decode_<wbr>block</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#panics" title="Panics">Panics</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>base64</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">base64</a></span><h1>Function <span class="fn">decode_block</span><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/base64.rs.html#37-73">Source</a> </span></div><pre class="rust item-decl"><code>pub fn decode_block(src: &<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Decodes a base64-encoded string to bytes.</p>
|
||||
<h2 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h2>
|
||||
<p>Panics if the input length or computed output length overflow a signed C integer.</p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_DecodeBlock.html"><code>EVP_DecodeBlock</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
5
openssl/base64/fn.encode_block.html
Normal file
5
openssl/base64/fn.encode_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<!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="Encodes a slice of bytes to a base64 string."><title>encode_block in openssl::base64 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">encode_<wbr>block</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#panics" title="Panics">Panics</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>base64</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">base64</a></span><h1>Function <span class="fn">encode_block</span><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/base64.rs.html#13-29">Source</a> </span></div><pre class="rust item-decl"><code>pub fn encode_block(src: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Encodes a slice of bytes to a base64 string.</p>
|
||||
<h2 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h2>
|
||||
<p>Panics if the input length or computed output length overflow a signed C integer.</p>
|
||||
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/EVP_EncodeBlock.html"><code>EVP_EncodeBlock</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
2
openssl/base64/index.html
Normal file
2
openssl/base64/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Base64 encoding support."><title>openssl::base64 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module base64</a></h2><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>base64</span><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/base64.rs.html#1-128">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Base64 encoding support.</p>
|
||||
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.decode_block.html" title="fn openssl::base64::decode_block">decode_<wbr>block</a></div><div class="desc docblock-short">Decodes a base64-encoded string to bytes.</div></li><li><div class="item-name"><a class="fn" href="fn.encode_block.html" title="fn openssl::base64::encode_block">encode_<wbr>block</a></div><div class="desc docblock-short">Encodes a slice of bytes to a base64 string.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/base64/sidebar-items.js
Normal file
1
openssl/base64/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["decode_block","encode_block"]};
|
||||
17
openssl/bn/index.html
Normal file
17
openssl/bn/index.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!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="BigNum implementation"><title>openssl::bn - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module bn</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>bn</span><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/bn.rs.html#1-1523">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>BigNum implementation</p>
|
||||
<p>Large numbers are important for a cryptographic library. OpenSSL implementation
|
||||
of BigNum uses dynamically assigned memory to store an array of bit chunks. This
|
||||
allows numbers of any size to be compared and mathematical functions performed.</p>
|
||||
<p>OpenSSL wiki describes the <a href="https://wiki.openssl.org/index.php/Manual:Bn_internal(3)"><code>BIGNUM</code></a> data structure.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::BigNum;
|
||||
<span class="kw">use </span>openssl::error::ErrorStack;
|
||||
|
||||
<span class="kw">fn </span>main() -> <span class="prelude-ty">Result</span><(), ErrorStack> {
|
||||
<span class="kw">let </span>a = BigNum::new()<span class="question-mark">?</span>; <span class="comment">// a = 0
|
||||
</span><span class="kw">let </span>b = BigNum::from_dec_str(<span class="string">"1234567890123456789012345"</span>)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>c = <span class="kw-2">&</span>a * <span class="kw-2">&</span>b;
|
||||
<span class="macro">assert_eq!</span>(a, c);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></div><div class="desc docblock-short">Dynamically sized large number implementation</div></li><li><div class="item-name"><a class="struct" href="struct.BigNumContext.html" title="struct openssl::bn::BigNumContext">BigNum<wbr>Context</a></div><div class="desc docblock-short">Temporary storage for BigNums on the secure heap</div></li><li><div class="item-name"><a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNum<wbr>Context<wbr>Ref</a></div><div class="desc docblock-short">Reference to <a href="struct.BigNumContext.html"><code>BigNumContext</code></a></div></li><li><div class="item-name"><a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNum<wbr>Ref</a></div><div class="desc docblock-short">Reference to a <a href="struct.BigNum.html"><code>BigNum</code></a></div></li><li><div class="item-name"><a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></div><div class="desc docblock-short">Options for the most significant bits of a randomly generated <code>BigNum</code>.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/bn/sidebar-items.js
Normal file
1
openssl/bn/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["BigNum","BigNumContext","BigNumContextRef","BigNumRef","MsbOption"]};
|
||||
402
openssl/bn/struct.BigNum.html
Normal file
402
openssl/bn/struct.BigNum.html
Normal file
File diff suppressed because one or more lines are too long
21
openssl/bn/struct.BigNumContext.html
Normal file
21
openssl/bn/struct.BigNumContext.html
Normal file
File diff suppressed because one or more lines are too long
12
openssl/bn/struct.BigNumContextRef.html
Normal file
12
openssl/bn/struct.BigNumContextRef.html
Normal file
File diff suppressed because one or more lines are too long
334
openssl/bn/struct.BigNumRef.html
Normal file
334
openssl/bn/struct.BigNumRef.html
Normal file
File diff suppressed because one or more lines are too long
17
openssl/bn/struct.MsbOption.html
Normal file
17
openssl/bn/struct.MsbOption.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!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="Options for the most significant bits of a randomly generated `BigNum`."><title>MsbOption in openssl::bn - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">MsbOption</a></h2><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.MAYBE_ZERO" title="MAYBE_ZERO">MAYBE_ZERO</a></li><li><a href="#associatedconstant.ONE" title="ONE">ONE</a></li><li><a href="#associatedconstant.TWO_ONES" title="TWO_ONES">TWO_ONES</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-MsbOption" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-MsbOption" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-MsbOption" title="Send">Send</a></li><li><a href="#impl-Sync-for-MsbOption" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-MsbOption" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-MsbOption" 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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>bn</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">bn</a></span><h1>Struct <span class="struct">MsbOption</span><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/bn.rs.html#68">Source</a> </span></div><pre class="rust item-decl"><code>pub struct MsbOption(<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>Options for the most significant bits of a randomly generated <code>BigNum</code>.</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-MsbOption" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#70-82">Source</a><a href="#impl-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.MAYBE_ZERO" class="associatedconstant"><a class="src rightside" href="../../src/openssl/bn.rs.html#72">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.MAYBE_ZERO" class="constant">MAYBE_ZERO</a>: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a> = _</h4></section></summary><div class="docblock"><p>The most significant bit of the number may be 0.</p>
|
||||
</div></details><details class="toggle" open><summary><section id="associatedconstant.ONE" class="associatedconstant"><a class="src rightside" href="../../src/openssl/bn.rs.html#75">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.ONE" class="constant">ONE</a>: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a> = _</h4></section></summary><div class="docblock"><p>The most significant bit of the number must be 1.</p>
|
||||
</div></details><details class="toggle" open><summary><section id="associatedconstant.TWO_ONES" class="associatedconstant"><a class="src rightside" href="../../src/openssl/bn.rs.html#81">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.TWO_ONES" class="constant">TWO_ONES</a>: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a> = _</h4></section></summary><div class="docblock"><p>The most significant two bits of the number must be 1.</p>
|
||||
<p>The number of bits in the product of two such numbers will always be exactly twice the
|
||||
number of bits in the original numbers.</p>
|
||||
</div></details></div></details></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-MsbOption" class="impl"><a href="#impl-Freeze-for-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></h3></section><section id="impl-RefUnwindSafe-for-MsbOption" class="impl"><a href="#impl-RefUnwindSafe-for-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></h3></section><section id="impl-Send-for-MsbOption" class="impl"><a href="#impl-Send-for-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></h3></section><section id="impl-Sync-for-MsbOption" class="impl"><a href="#impl-Sync-for-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></h3></section><section id="impl-Unpin-for-MsbOption" class="impl"><a href="#impl-Unpin-for-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a></h3></section><section id="impl-UnwindSafe-for-MsbOption" class="impl"><a href="#impl-UnwindSafe-for-MsbOption" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</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.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> 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.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> 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.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||||
</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.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></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.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>
|
||||
2
openssl/cipher/index.html
Normal file
2
openssl/cipher/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Symmetric ciphers."><title>openssl::cipher - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module cipher</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>cipher</span><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.rs.html#1-597">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Symmetric ciphers.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Cipher.html" title="struct openssl::cipher::Cipher">Cipher</a></div><div class="desc docblock-short">A symmetric cipher.</div></li><li><div class="item-name"><a class="struct" href="struct.CipherRef.html" title="struct openssl::cipher::CipherRef">Cipher<wbr>Ref</a></div><div class="desc docblock-short">A reference to a <a href="struct.Cipher.html" title="struct openssl::cipher::Cipher"><code>Cipher</code></a>.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/cipher/sidebar-items.js
Normal file
1
openssl/cipher/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Cipher","CipherRef"]};
|
||||
44
openssl/cipher/struct.Cipher.html
Normal file
44
openssl/cipher/struct.Cipher.html
Normal file
File diff suppressed because one or more lines are too long
24
openssl/cipher/struct.CipherRef.html
Normal file
24
openssl/cipher/struct.CipherRef.html
Normal file
File diff suppressed because one or more lines are too long
44
openssl/cipher_ctx/index.html
Normal file
44
openssl/cipher_ctx/index.html
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<!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="The symmetric encryption context."><title>openssl::cipher_ctx - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module cipher_<wbr>ctx</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>cipher_ctx</span><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#1-1106">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The symmetric encryption context.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>Encrypt data with AES128 CBC</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::cipher::Cipher;
|
||||
<span class="kw">use </span>openssl::cipher_ctx::CipherCtx;
|
||||
|
||||
<span class="kw">let </span>cipher = Cipher::aes_128_cbc();
|
||||
<span class="kw">let </span>data = <span class="string">b"Some Crypto Text"</span>;
|
||||
<span class="kw">let </span>key = <span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"</span>;
|
||||
<span class="kw">let </span>iv = <span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07"</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>ctx = CipherCtx::new().unwrap();
|
||||
ctx.encrypt_init(<span class="prelude-val">Some</span>(cipher), <span class="prelude-val">Some</span>(key), <span class="prelude-val">Some</span>(iv)).unwrap();
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>ciphertext = <span class="macro">vec!</span>[];
|
||||
ctx.cipher_update_vec(data, <span class="kw-2">&mut </span>ciphertext).unwrap();
|
||||
ctx.cipher_final_vec(<span class="kw-2">&mut </span>ciphertext).unwrap();
|
||||
|
||||
<span class="macro">assert_eq!</span>(
|
||||
<span class="string">b"\xB4\xB9\xE7\x30\xD6\xD6\xF7\xDE\x77\x3F\x1C\xFF\xB3\x3E\x44\x5A\x91\xD7\x27\x62\x87\x4D\
|
||||
\xFB\x3C\x5E\xC4\x59\x72\x4A\xF4\x7C\xA1"</span>,
|
||||
<span class="kw-2">&</span>ciphertext[..],
|
||||
);</code></pre></div>
|
||||
<p>Decrypt data with AES128 CBC</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::cipher::Cipher;
|
||||
<span class="kw">use </span>openssl::cipher_ctx::CipherCtx;
|
||||
|
||||
<span class="kw">let </span>cipher = Cipher::aes_128_cbc();
|
||||
<span class="kw">let </span>data = <span class="string">b"\xB4\xB9\xE7\x30\xD6\xD6\xF7\xDE\x77\x3F\x1C\xFF\xB3\x3E\x44\x5A\x91\xD7\x27\x62\
|
||||
\x87\x4D\xFB\x3C\x5E\xC4\x59\x72\x4A\xF4\x7C\xA1"</span>;
|
||||
<span class="kw">let </span>key = <span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"</span>;
|
||||
<span class="kw">let </span>iv = <span class="string">b"\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07"</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>ctx = CipherCtx::new().unwrap();
|
||||
ctx.decrypt_init(<span class="prelude-val">Some</span>(cipher), <span class="prelude-val">Some</span>(key), <span class="prelude-val">Some</span>(iv)).unwrap();
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>plaintext = <span class="macro">vec!</span>[];
|
||||
ctx.cipher_update_vec(data, <span class="kw-2">&mut </span>plaintext).unwrap();
|
||||
ctx.cipher_final_vec(<span class="kw-2">&mut </span>plaintext).unwrap();
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="string">b"Some Crypto Text"</span>, <span class="kw-2">&</span>plaintext[..]);</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx">Cipher<wbr>Ctx</a></div><div class="desc docblock-short">A context object used to perform symmetric encryption operations.</div></li><li><div class="item-name"><a class="struct" href="struct.CipherCtxFlags.html" title="struct openssl::cipher_ctx::CipherCtxFlags">Cipher<wbr>CtxFlags</a></div><div class="desc docblock-short">Flags for <code>EVP_CIPHER_CTX</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.CipherCtxRef.html" title="struct openssl::cipher_ctx::CipherCtxRef">Cipher<wbr>CtxRef</a></div><div class="desc docblock-short">A reference to a <a href="struct.CipherCtx.html" title="struct openssl::cipher_ctx::CipherCtx"><code>CipherCtx</code></a>.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/cipher_ctx/sidebar-items.js
Normal file
1
openssl/cipher_ctx/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["CipherCtx","CipherCtxFlags","CipherCtxRef"]};
|
||||
205
openssl/cipher_ctx/struct.CipherCtx.html
Normal file
205
openssl/cipher_ctx/struct.CipherCtx.html
Normal file
File diff suppressed because one or more lines are too long
68
openssl/cipher_ctx/struct.CipherCtxFlags.html
Normal file
68
openssl/cipher_ctx/struct.CipherCtxFlags.html
Normal file
File diff suppressed because one or more lines are too long
201
openssl/cipher_ctx/struct.CipherCtxRef.html
Normal file
201
openssl/cipher_ctx/struct.CipherCtxRef.html
Normal file
File diff suppressed because one or more lines are too long
6
openssl/cms/index.html
Normal file
6
openssl/cms/index.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<!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="SMIME implementation using CMS"><title>openssl::cms - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module cms</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>cms</span><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/cms.rs.html#1-484">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>SMIME implementation using CMS</p>
|
||||
<p>CMS (PKCS#7) is an encryption standard. It allows signing and encrypting data using
|
||||
X.509 certificates. The OpenSSL implementation of CMS is used in email encryption
|
||||
generated from a <code>Vec</code> of bytes. This <code>Vec</code> follows the smime protocol standards.
|
||||
Data accepted by this module will be smime type <code>enveloped-data</code>.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.CMSOptions.html" title="struct openssl::cms::CMSOptions">CMSOptions</a></div></li><li><div class="item-name"><a class="struct" href="struct.CmsContentInfo.html" title="struct openssl::cms::CmsContentInfo">CmsContent<wbr>Info</a></div><div class="desc docblock-short">High level CMS wrapper</div></li><li><div class="item-name"><a class="struct" href="struct.CmsContentInfoRef.html" title="struct openssl::cms::CmsContentInfoRef">CmsContent<wbr>Info<wbr>Ref</a></div><div class="desc docblock-short">Reference to <a href="struct.CmsContentInfo.html"><code>CMSContentInfo</code></a></div></li></ul></section></div></main></body></html>
|
||||
1
openssl/cms/sidebar-items.js
Normal file
1
openssl/cms/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["CMSOptions","CmsContentInfo","CmsContentInfoRef"]};
|
||||
77
openssl/cms/struct.CMSOptions.html
Normal file
77
openssl/cms/struct.CMSOptions.html
Normal file
File diff suppressed because one or more lines are too long
78
openssl/cms/struct.CmsContentInfo.html
Normal file
78
openssl/cms/struct.CmsContentInfo.html
Normal file
File diff suppressed because one or more lines are too long
32
openssl/cms/struct.CmsContentInfoRef.html
Normal file
32
openssl/cms/struct.CmsContentInfoRef.html
Normal file
File diff suppressed because one or more lines are too long
2
openssl/conf/index.html
Normal file
2
openssl/conf/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Interface for processing OpenSSL configuration files."><title>openssl::conf - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module conf</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>conf</span><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/conf.rs.html#1-65">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Interface for processing OpenSSL configuration files.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Conf.html" title="struct openssl::conf::Conf">Conf</a></div></li><li><div class="item-name"><a class="struct" href="struct.ConfMethod.html" title="struct openssl::conf::ConfMethod">Conf<wbr>Method</a></div></li><li><div class="item-name"><a class="struct" href="struct.ConfRef.html" title="struct openssl::conf::ConfRef">ConfRef</a></div></li></ul></section></div></main></body></html>
|
||||
11
openssl/conf/methods/struct.ConfMethod.html
Normal file
11
openssl/conf/methods/struct.ConfMethod.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../openssl/conf/struct.ConfMethod.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../openssl/conf/struct.ConfMethod.html">../../../openssl/conf/struct.ConfMethod.html</a>...</p>
|
||||
<script>location.replace("../../../openssl/conf/struct.ConfMethod.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
1
openssl/conf/sidebar-items.js
Normal file
1
openssl/conf/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Conf","ConfMethod","ConfRef"]};
|
||||
19
openssl/conf/struct.Conf.html
Normal file
19
openssl/conf/struct.Conf.html
Normal file
File diff suppressed because one or more lines are too long
17
openssl/conf/struct.ConfMethod.html
Normal file
17
openssl/conf/struct.ConfMethod.html
Normal file
File diff suppressed because one or more lines are too long
11
openssl/conf/struct.ConfRef.html
Normal file
11
openssl/conf/struct.ConfRef.html
Normal file
File diff suppressed because one or more lines are too long
41
openssl/derive/index.html
Normal file
41
openssl/derive/index.html
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!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="Shared secret derivation."><title>openssl::derive - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module derive</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>derive</span><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/derive.rs.html#1-217">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Shared secret derivation.</p>
|
||||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
|
||||
<p>The following example implements <a href="https://wiki.openssl.org/index.php/Elliptic_Curve_Diffie_Hellman">ECDH</a> using <code>NIST P-384</code> keys:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::BigNumContext;
|
||||
<span class="kw">use </span>openssl::pkey::PKey;
|
||||
<span class="kw">use </span>openssl::derive::Deriver;
|
||||
<span class="kw">use </span>openssl::ec::{EcGroup, EcKey, EcPoint, PointConversionForm};
|
||||
<span class="kw">use </span>openssl::nid::Nid;
|
||||
|
||||
<span class="kw">let </span>group = EcGroup::from_curve_name(Nid::SECP384R1)<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span>first: PKey<<span class="kw">_</span>> = EcKey::generate(<span class="kw-2">&</span>group)<span class="question-mark">?</span>.try_into()<span class="question-mark">?</span>;
|
||||
|
||||
<span class="comment">// second party generates an ephemeral key and derives
|
||||
// a shared secret using first party's public key
|
||||
</span><span class="kw">let </span>shared_key = EcKey::generate(<span class="kw-2">&</span>group)<span class="question-mark">?</span>;
|
||||
<span class="comment">// shared_public is sent to first party
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>ctx = BigNumContext::new()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>shared_public = shared_key.public_key().to_bytes(
|
||||
<span class="kw-2">&</span>group,
|
||||
PointConversionForm::COMPRESSED,
|
||||
<span class="kw-2">&mut </span>ctx,
|
||||
)<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span>shared_key: PKey<<span class="kw">_</span>> = shared_key.try_into()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>deriver = Deriver::new(<span class="kw-2">&</span>shared_key)<span class="question-mark">?</span>;
|
||||
deriver.set_peer(<span class="kw-2">&</span>first)<span class="question-mark">?</span>;
|
||||
<span class="comment">// secret can be used e.g. as a symmetric encryption key
|
||||
</span><span class="kw">let </span>secret = deriver.derive_to_vec()<span class="question-mark">?</span>;
|
||||
|
||||
<span class="comment">// first party derives the same shared secret using
|
||||
// shared_public
|
||||
</span><span class="kw">let </span>point = EcPoint::from_bytes(<span class="kw-2">&</span>group, <span class="kw-2">&</span>shared_public, <span class="kw-2">&mut </span>ctx)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>recipient_key: PKey<<span class="kw">_</span>> = EcKey::from_public_key(<span class="kw-2">&</span>group, <span class="kw-2">&</span>point)<span class="question-mark">?</span>.try_into()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>deriver = Deriver::new(<span class="kw-2">&</span>first)<span class="question-mark">?</span>;
|
||||
deriver.set_peer(<span class="kw-2">&</span>recipient_key)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>first_secret = deriver.derive_to_vec()<span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(secret, first_secret);</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Deriver.html" title="struct openssl::derive::Deriver">Deriver</a></div><div class="desc docblock-short">A type used to derive a shared secret between two keys.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/derive/sidebar-items.js
Normal file
1
openssl/derive/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Deriver"]};
|
||||
34
openssl/derive/struct.Deriver.html
Normal file
34
openssl/derive/struct.Deriver.html
Normal file
File diff suppressed because one or more lines are too long
2
openssl/dh/index.html
Normal file
2
openssl/dh/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Diffie-Hellman key agreement."><title>openssl::dh - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dh</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>dh</span><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/dh.rs.html#1-499">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Diffie-Hellman key agreement.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Dh.html" title="struct openssl::dh::Dh">Dh</a></div></li><li><div class="item-name"><a class="struct" href="struct.DhRef.html" title="struct openssl::dh::DhRef">DhRef</a></div></li></ul></section></div></main></body></html>
|
||||
1
openssl/dh/sidebar-items.js
Normal file
1
openssl/dh/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Dh","DhRef"]};
|
||||
74
openssl/dh/struct.Dh.html
Normal file
74
openssl/dh/struct.Dh.html
Normal file
File diff suppressed because one or more lines are too long
29
openssl/dh/struct.DhRef.html
Normal file
29
openssl/dh/struct.DhRef.html
Normal file
File diff suppressed because one or more lines are too long
6
openssl/dsa/index.html
Normal file
6
openssl/dsa/index.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<!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="Digital Signatures"><title>openssl::dsa - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dsa</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>dsa</span><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/dsa.rs.html#1-697">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Digital Signatures</p>
|
||||
<p>DSA ensures a message originated from a known sender, and was not modified.
|
||||
DSA uses asymmetrical keys and an algorithm to output a signature of the message
|
||||
using the private key that can be validated with the public key but not be generated
|
||||
without the private key.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Dsa.html" title="struct openssl::dsa::Dsa">Dsa</a></div><div class="desc docblock-short">Object representing DSA keys.</div></li><li><div class="item-name"><a class="struct" href="struct.DsaRef.html" title="struct openssl::dsa::DsaRef">DsaRef</a></div><div class="desc docblock-short">Reference to <a href="struct.Dsa.html"><code>Dsa</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.DsaSig.html" title="struct openssl::dsa::DsaSig">DsaSig</a></div><div class="desc docblock-short">Object representing DSA signature.</div></li><li><div class="item-name"><a class="struct" href="struct.DsaSigRef.html" title="struct openssl::dsa::DsaSigRef">DsaSig<wbr>Ref</a></div><div class="desc docblock-short">Reference to a <a href="struct.DsaSig.html" title="struct openssl::dsa::DsaSig"><code>DsaSig</code></a>.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/dsa/sidebar-items.js
Normal file
1
openssl/dsa/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Dsa","DsaRef","DsaSig","DsaSigRef"]};
|
||||
102
openssl/dsa/struct.Dsa.html
Normal file
102
openssl/dsa/struct.Dsa.html
Normal file
File diff suppressed because one or more lines are too long
46
openssl/dsa/struct.DsaRef.html
Normal file
46
openssl/dsa/struct.DsaRef.html
Normal file
File diff suppressed because one or more lines are too long
66
openssl/dsa/struct.DsaSig.html
Normal file
66
openssl/dsa/struct.DsaSig.html
Normal file
File diff suppressed because one or more lines are too long
18
openssl/dsa/struct.DsaSigRef.html
Normal file
18
openssl/dsa/struct.DsaSigRef.html
Normal file
File diff suppressed because one or more lines are too long
11
openssl/ec/index.html
Normal file
11
openssl/ec/index.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!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="Elliptic Curve"><title>openssl::ec - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module ec</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>ec</span><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/ec.rs.html#1-1345">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Elliptic Curve</p>
|
||||
<p>Cryptography relies on the difficulty of solving mathematical problems, such as the factor
|
||||
of large integers composed of two large prime numbers and the discrete logarithm of a
|
||||
random elliptic curve. This module provides low-level features of the latter.
|
||||
Elliptic Curve protocols can provide the same security with smaller keys.</p>
|
||||
<p>There are 2 forms of elliptic curves, <code>Fp</code> and <code>F2^m</code>. These curves use irreducible
|
||||
trinomial or pentanomial. Being a generic interface to a wide range of algorithms,
|
||||
the curves are generally referenced by <a href="struct.EcGroup.html"><code>EcGroup</code></a>. There are many built-in groups
|
||||
found in <a href="../nid/struct.Nid.html"><code>Nid</code></a>.</p>
|
||||
<p>OpenSSL Wiki explains the fields and curves in detail at <a href="https://wiki.openssl.org/index.php/Elliptic_Curve_Cryptography">Elliptic Curve Cryptography</a>.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Asn1Flag.html" title="struct openssl::ec::Asn1Flag">Asn1<wbr>Flag</a></div><div class="desc docblock-short">Named Curve or Explicit</div></li><li><div class="item-name"><a class="struct" href="struct.EcGroup.html" title="struct openssl::ec::EcGroup">EcGroup</a></div><div class="desc docblock-short">Describes the curve</div></li><li><div class="item-name"><a class="struct" href="struct.EcGroupRef.html" title="struct openssl::ec::EcGroupRef">EcGroup<wbr>Ref</a></div><div class="desc docblock-short">Reference to <a href="struct.EcGroup.html"><code>EcGroup</code></a></div></li><li><div class="item-name"><a class="struct" href="struct.EcKey.html" title="struct openssl::ec::EcKey">EcKey</a></div><div class="desc docblock-short">Public and optional private key on the given curve.</div></li><li><div class="item-name"><a class="struct" href="struct.EcKeyRef.html" title="struct openssl::ec::EcKeyRef">EcKey<wbr>Ref</a></div><div class="desc docblock-short">A reference to an <a href="struct.EcKey.html" title="struct openssl::ec::EcKey"><code>EcKey</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.EcPoint.html" title="struct openssl::ec::EcPoint">EcPoint</a></div><div class="desc docblock-short">Represents a point on the curve</div></li><li><div class="item-name"><a class="struct" href="struct.EcPointRef.html" title="struct openssl::ec::EcPointRef">EcPoint<wbr>Ref</a></div><div class="desc docblock-short">A reference a borrowed <a href="struct.EcPoint.html" title="struct openssl::ec::EcPoint"><code>EcPoint</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.PointConversionForm.html" title="struct openssl::ec::PointConversionForm">Point<wbr>Conversion<wbr>Form</a></div><div class="desc docblock-short">Compressed or Uncompressed conversion</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/ec/sidebar-items.js
Normal file
1
openssl/ec/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Asn1Flag","EcGroup","EcGroupRef","EcKey","EcKeyRef","EcPoint","EcPointRef","PointConversionForm"]};
|
||||
28
openssl/ec/struct.Asn1Flag.html
Normal file
28
openssl/ec/struct.Asn1Flag.html
Normal file
File diff suppressed because one or more lines are too long
94
openssl/ec/struct.EcGroup.html
Normal file
94
openssl/ec/struct.EcGroup.html
Normal file
File diff suppressed because one or more lines are too long
67
openssl/ec/struct.EcGroupRef.html
Normal file
67
openssl/ec/struct.EcGroupRef.html
Normal file
File diff suppressed because one or more lines are too long
131
openssl/ec/struct.EcKey.html
Normal file
131
openssl/ec/struct.EcKey.html
Normal file
File diff suppressed because one or more lines are too long
42
openssl/ec/struct.EcKeyRef.html
Normal file
42
openssl/ec/struct.EcKeyRef.html
Normal file
File diff suppressed because one or more lines are too long
133
openssl/ec/struct.EcPoint.html
Normal file
133
openssl/ec/struct.EcPoint.html
Normal file
File diff suppressed because one or more lines are too long
117
openssl/ec/struct.EcPointRef.html
Normal file
117
openssl/ec/struct.EcPointRef.html
Normal file
File diff suppressed because one or more lines are too long
21
openssl/ec/struct.PointConversionForm.html
Normal file
21
openssl/ec/struct.PointConversionForm.html
Normal file
File diff suppressed because one or more lines are too long
2
openssl/ecdsa/index.html
Normal file
2
openssl/ecdsa/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Low level Elliptic Curve Digital Signature Algorithm (ECDSA) functions."><title>openssl::ecdsa - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module ecdsa</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>ecdsa</span><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/ecdsa.rs.html#1-224">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Low level Elliptic Curve Digital Signature Algorithm (ECDSA) functions.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.EcdsaSig.html" title="struct openssl::ecdsa::EcdsaSig">Ecdsa<wbr>Sig</a></div><div class="desc docblock-short">A low level interface to ECDSA.</div></li><li><div class="item-name"><a class="struct" href="struct.EcdsaSigRef.html" title="struct openssl::ecdsa::EcdsaSigRef">Ecdsa<wbr>SigRef</a></div><div class="desc docblock-short">A reference to an <a href="struct.EcdsaSig.html" title="struct openssl::ecdsa::EcdsaSig"><code>EcdsaSig</code></a>.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/ecdsa/sidebar-items.js
Normal file
1
openssl/ecdsa/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["EcdsaSig","EcdsaSigRef"]};
|
||||
37
openssl/ecdsa/struct.EcdsaSig.html
Normal file
37
openssl/ecdsa/struct.EcdsaSig.html
Normal file
File diff suppressed because one or more lines are too long
25
openssl/ecdsa/struct.EcdsaSigRef.html
Normal file
25
openssl/ecdsa/struct.EcdsaSigRef.html
Normal file
File diff suppressed because one or more lines are too long
37
openssl/encrypt/index.html
Normal file
37
openssl/encrypt/index.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<!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="Message encryption."><title>openssl::encrypt - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module encrypt</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>encrypt</span><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/encrypt.rs.html#1-578">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Message encryption.</p>
|
||||
<p>The <a href="struct.Encrypter.html" title="struct openssl::encrypt::Encrypter"><code>Encrypter</code></a> allows for encryption of data given a public key. The <a href="struct.Decrypter.html" title="struct openssl::encrypt::Decrypter"><code>Decrypter</code></a> can be
|
||||
used with the corresponding private key to decrypt the data.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>Encrypt and decrypt data given an RSA keypair:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::encrypt::{Encrypter, Decrypter};
|
||||
<span class="kw">use </span>openssl::rsa::{Rsa, Padding};
|
||||
<span class="kw">use </span>openssl::pkey::PKey;
|
||||
|
||||
<span class="comment">// Generate a keypair
|
||||
</span><span class="kw">let </span>keypair = Rsa::generate(<span class="number">2048</span>).unwrap();
|
||||
<span class="kw">let </span>keypair = PKey::from_rsa(keypair).unwrap();
|
||||
|
||||
<span class="kw">let </span>data = <span class="string">b"hello, world!"</span>;
|
||||
|
||||
<span class="comment">// Encrypt the data with RSA PKCS1
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>encrypter = Encrypter::new(<span class="kw-2">&</span>keypair).unwrap();
|
||||
encrypter.set_rsa_padding(Padding::PKCS1).unwrap();
|
||||
<span class="comment">// Create an output buffer
|
||||
</span><span class="kw">let </span>buffer_len = encrypter.encrypt_len(data).unwrap();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>encrypted = <span class="macro">vec!</span>[<span class="number">0</span>; buffer_len];
|
||||
<span class="comment">// Encrypt and truncate the buffer
|
||||
</span><span class="kw">let </span>encrypted_len = encrypter.encrypt(data, <span class="kw-2">&mut </span>encrypted).unwrap();
|
||||
encrypted.truncate(encrypted_len);
|
||||
|
||||
<span class="comment">// Decrypt the data
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>decrypter = Decrypter::new(<span class="kw-2">&</span>keypair).unwrap();
|
||||
decrypter.set_rsa_padding(Padding::PKCS1).unwrap();
|
||||
<span class="comment">// Create an output buffer
|
||||
</span><span class="kw">let </span>buffer_len = decrypter.decrypt_len(<span class="kw-2">&</span>encrypted).unwrap();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>decrypted = <span class="macro">vec!</span>[<span class="number">0</span>; buffer_len];
|
||||
<span class="comment">// Encrypt and truncate the buffer
|
||||
</span><span class="kw">let </span>decrypted_len = decrypter.decrypt(<span class="kw-2">&</span>encrypted, <span class="kw-2">&mut </span>decrypted).unwrap();
|
||||
decrypted.truncate(decrypted_len);
|
||||
<span class="macro">assert_eq!</span>(<span class="kw-2">&*</span>decrypted, data);</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Decrypter.html" title="struct openssl::encrypt::Decrypter">Decrypter</a></div><div class="desc docblock-short">A type which decrypts data.</div></li><li><div class="item-name"><a class="struct" href="struct.Encrypter.html" title="struct openssl::encrypt::Encrypter">Encrypter</a></div><div class="desc docblock-short">A type which encrypts data.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/encrypt/sidebar-items.js
Normal file
1
openssl/encrypt/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Decrypter","Encrypter"]};
|
||||
49
openssl/encrypt/struct.Decrypter.html
Normal file
49
openssl/encrypt/struct.Decrypter.html
Normal file
File diff suppressed because one or more lines are too long
49
openssl/encrypt/struct.Encrypter.html
Normal file
49
openssl/encrypt/struct.Encrypter.html
Normal file
File diff suppressed because one or more lines are too long
20
openssl/envelope/index.html
Normal file
20
openssl/envelope/index.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!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="Envelope encryption."><title>openssl::envelope - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module envelope</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>envelope</span><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/envelope.rs.html#1-181">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Envelope encryption.</p>
|
||||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::rsa::Rsa;
|
||||
<span class="kw">use </span>openssl::envelope::Seal;
|
||||
<span class="kw">use </span>openssl::pkey::PKey;
|
||||
<span class="kw">use </span>openssl::symm::Cipher;
|
||||
|
||||
<span class="kw">let </span>rsa = Rsa::generate(<span class="number">2048</span>).unwrap();
|
||||
<span class="kw">let </span>key = PKey::from_rsa(rsa).unwrap();
|
||||
|
||||
<span class="kw">let </span>cipher = Cipher::aes_256_cbc();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>seal = Seal::new(cipher, <span class="kw-2">&</span>[key]).unwrap();
|
||||
|
||||
<span class="kw">let </span>secret = <span class="string">b"My secret message"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>encrypted = <span class="macro">vec!</span>[<span class="number">0</span>; secret.len() + cipher.block_size()];
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>enc_len = seal.update(secret, <span class="kw-2">&mut </span>encrypted).unwrap();
|
||||
enc_len += seal.finalize(<span class="kw-2">&mut </span>encrypted[enc_len..]).unwrap();
|
||||
encrypted.truncate(enc_len);</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a></div><div class="desc docblock-short">Represents an EVP_Open context.</div></li><li><div class="item-name"><a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a></div><div class="desc docblock-short">Represents an EVP_Seal context.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/envelope/sidebar-items.js
Normal file
1
openssl/envelope/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Open","Seal"]};
|
||||
35
openssl/envelope/struct.Open.html
Normal file
35
openssl/envelope/struct.Open.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!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="Represents an EVP_Open context."><title>Open in openssl::envelope - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Open</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.finalize" title="finalize">finalize</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.update" title="update">update</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Open" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Open" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Open" title="Send">Send</a></li><li><a href="#impl-Sync-for-Open" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Open" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Open" 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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>envelope</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">envelope</a></span><h1>Struct <span class="struct">Open</span><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/envelope.rs.html#98-100">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Open { <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>Represents an EVP_Open context.</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-Open" class="impl"><a class="src rightside" href="../../src/openssl/envelope.rs.html#102-150">Source</a><a href="#impl-Open" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</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/envelope.rs.html#104-122">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a><T>(
|
||||
cipher: <a class="struct" href="../symm/struct.Cipher.html" title="struct openssl::symm::Cipher">Cipher</a>,
|
||||
priv_key: &<a class="struct" href="../pkey/struct.PKeyRef.html" title="struct openssl::pkey::PKeyRef">PKeyRef</a><T>,
|
||||
iv: <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]>,
|
||||
encrypted_key: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>><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>Creates a new <code>Open</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.update" class="method"><a class="src rightside" href="../../src/openssl/envelope.rs.html#134-136">Source</a><h4 class="code-header">pub fn <a href="#method.update" class="fn">update</a>(
|
||||
&mut self,
|
||||
input: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
output: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>></h4></section></summary><div class="docblock"><p>Feeds data from <code>input</code> through the cipher, writing decrypted bytes into <code>output</code>.</p>
|
||||
<p>The number of bytes written to <code>output</code> is returned. Note that this may
|
||||
not be equal to the length of <code>input</code>.</p>
|
||||
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
|
||||
<p>Panics if <code>output.len() < input.len() + block_size</code> where
|
||||
<code>block_size</code> is the block size of the cipher (see <code>Cipher::block_size</code>),
|
||||
or if <code>output.len() > c_int::MAX</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.finalize" class="method"><a class="src rightside" href="../../src/openssl/envelope.rs.html#147-149">Source</a><h4 class="code-header">pub fn <a href="#method.finalize" class="fn">finalize</a>(&mut self, output: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>></h4></section></summary><div class="docblock"><p>Finishes the decryption process, writing any remaining data to <code>output</code>.</p>
|
||||
<p>The number of bytes written to <code>output</code> is returned.</p>
|
||||
<p><code>update</code> should not be called after this method.</p>
|
||||
<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5>
|
||||
<p>Panics if <code>output</code> is less than the cipher’s block size.</p>
|
||||
</div></details></div></details></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-Open" class="impl"><a href="#impl-Freeze-for-Open" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a></h3></section><section id="impl-RefUnwindSafe-for-Open" class="impl"><a href="#impl-RefUnwindSafe-for-Open" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a></h3></section><section id="impl-Send-for-Open" class="impl"><a href="#impl-Send-for-Open" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a></h3></section><section id="impl-Sync-for-Open" class="impl"><a href="#impl-Sync-for-Open" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a></h3></section><section id="impl-Unpin-for-Open" class="impl"><a href="#impl-Unpin-for-Open" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</a></h3></section><section id="impl-UnwindSafe-for-Open" class="impl"><a href="#impl-UnwindSafe-for-Open" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Open.html" title="struct openssl::envelope::Open">Open</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.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> 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.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> 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.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||||
</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.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></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.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>
|
||||
32
openssl/envelope/struct.Seal.html
Normal file
32
openssl/envelope/struct.Seal.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<!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="Represents an EVP_Seal context."><title>Seal in openssl::envelope - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Seal</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.encrypted_keys" title="encrypted_keys">encrypted_keys</a></li><li><a href="#method.finalize" title="finalize">finalize</a></li><li><a href="#method.iv" title="iv">iv</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.update" title="update">update</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Seal" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Seal" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Seal" title="Send">Send</a></li><li><a href="#impl-Sync-for-Seal" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Seal" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Seal" 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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>envelope</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">envelope</a></span><h1>Struct <span class="struct">Seal</span><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/envelope.rs.html#32-36">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Seal { <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>Represents an EVP_Seal context.</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-Seal" class="impl"><a class="src rightside" href="../../src/openssl/envelope.rs.html#38-95">Source</a><a href="#impl-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</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/envelope.rs.html#40-56">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a><T>(cipher: <a class="struct" href="../symm/struct.Cipher.html" title="struct openssl::symm::Cipher">Cipher</a>, pub_keys: &[<a class="struct" href="../pkey/struct.PKey.html" title="struct openssl::pkey::PKey">PKey</a><T>]) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>><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>Creates a new <code>Seal</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.iv" class="method"><a class="src rightside" href="../../src/openssl/envelope.rs.html#60-62">Source</a><h4 class="code-header">pub fn <a href="#method.iv" class="fn">iv</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Returns the initialization vector, if the cipher uses one.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.encrypted_keys" class="method"><a class="src rightside" href="../../src/openssl/envelope.rs.html#65-67">Source</a><h4 class="code-header">pub fn <a href="#method.encrypted_keys" class="fn">encrypted_keys</a>(&self) -> &[<a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>>]</h4></section></summary><div class="docblock"><p>Returns the encrypted keys.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.update" class="method"><a class="src rightside" href="../../src/openssl/envelope.rs.html#79-81">Source</a><h4 class="code-header">pub fn <a href="#method.update" class="fn">update</a>(
|
||||
&mut self,
|
||||
input: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
output: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>></h4></section></summary><div class="docblock"><p>Feeds data from <code>input</code> through the cipher, writing encrypted bytes into <code>output</code>.</p>
|
||||
<p>The number of bytes written to <code>output</code> is returned. Note that this may
|
||||
not be equal to the length of <code>input</code>.</p>
|
||||
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
|
||||
<p>Panics if <code>output.len() < input.len() + block_size</code> where <code>block_size</code> is
|
||||
the block size of the cipher (see <code>Cipher::block_size</code>), or if
|
||||
<code>output.len() > c_int::MAX</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.finalize" class="method"><a class="src rightside" href="../../src/openssl/envelope.rs.html#92-94">Source</a><h4 class="code-header">pub fn <a href="#method.finalize" class="fn">finalize</a>(&mut self, output: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>></h4></section></summary><div class="docblock"><p>Finishes the encryption process, writing any remaining data to <code>output</code>.</p>
|
||||
<p>The number of bytes written to <code>output</code> is returned.</p>
|
||||
<p><code>update</code> should not be called after this method.</p>
|
||||
<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5>
|
||||
<p>Panics if <code>output</code> is less than the cipher’s block size.</p>
|
||||
</div></details></div></details></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-Seal" class="impl"><a href="#impl-Freeze-for-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a></h3></section><section id="impl-RefUnwindSafe-for-Seal" class="impl"><a href="#impl-RefUnwindSafe-for-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a></h3></section><section id="impl-Send-for-Seal" class="impl"><a href="#impl-Send-for-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a></h3></section><section id="impl-Sync-for-Seal" class="impl"><a href="#impl-Sync-for-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a></h3></section><section id="impl-Unpin-for-Seal" class="impl"><a href="#impl-Unpin-for-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</a></h3></section><section id="impl-UnwindSafe-for-Seal" class="impl"><a href="#impl-UnwindSafe-for-Seal" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Seal.html" title="struct openssl::envelope::Seal">Seal</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.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> 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.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> 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.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||||
</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.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></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.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>
|
||||
13
openssl/error/index.html
Normal file
13
openssl/error/index.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!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="Errors returned by OpenSSL library."><title>openssl::error - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module error</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>error</span><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/error.rs.html#1-418">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Errors returned by OpenSSL library.</p>
|
||||
<p>OpenSSL errors are stored in an <code>ErrorStack</code>. Most methods in the crate
|
||||
returns a <code>Result<T, ErrorStack></code> type.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::error::ErrorStack;
|
||||
<span class="kw">use </span>openssl::bn::BigNum;
|
||||
|
||||
<span class="kw">let </span>an_error = BigNum::from_dec_str(<span class="string">"Cannot parse letters"</span>);
|
||||
<span class="kw">match </span>an_error {
|
||||
<span class="prelude-val">Ok</span>(<span class="kw">_</span>) => (),
|
||||
<span class="prelude-val">Err</span>(e) => <span class="macro">println!</span>(<span class="string">"Parsing Error: {:?}"</span>, e),
|
||||
}</code></pre></div>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Error.html" title="struct openssl::error::Error">Error</a></div><div class="desc docblock-short">An error reported from OpenSSL.</div></li><li><div class="item-name"><a class="struct" href="struct.ErrorStack.html" title="struct openssl::error::ErrorStack">Error<wbr>Stack</a></div><div class="desc docblock-short">Collection of <a href="struct.Error.html"><code>Error</code></a>s from OpenSSL.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/error/sidebar-items.js
Normal file
1
openssl/error/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Error","ErrorStack"]};
|
||||
27
openssl/error/struct.Error.html
Normal file
27
openssl/error/struct.Error.html
Normal file
File diff suppressed because one or more lines are too long
18
openssl/error/struct.ErrorStack.html
Normal file
18
openssl/error/struct.ErrorStack.html
Normal file
File diff suppressed because one or more lines are too long
1
openssl/ex_data/index.html
Normal file
1
openssl/ex_data/index.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!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="API documentation for the Rust `ex_data` mod in crate `openssl`."><title>openssl::ex_data - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.68</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module ex_data</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate openssl</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a></span><h1>Module <span>ex_data</span><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/ex_data.rs.html#1-32">Source</a> </span></div><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Index.html" title="struct openssl::ex_data::Index">Index</a></div><div class="desc docblock-short">A slot in a type’s “extra data” structure.</div></li></ul></section></div></main></body></html>
|
||||
1
openssl/ex_data/sidebar-items.js
Normal file
1
openssl/ex_data/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Index"]};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue