📄 class_o_f_b___mode_policy.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: OFB_ModePolicy Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div><h1>OFB_ModePolicy Class Reference</h1><!-- doxytag: class="OFB_ModePolicy" --><!-- doxytag: inherits="ModePolicyCommonTemplate< AdditiveCipherAbstractPolicy >" --><p>Inheritance diagram for OFB_ModePolicy:<p><center><img src="class_o_f_b___mode_policy.png" usemap="#OFB_ModePolicy_map" border="0" alt=""></center><map name="OFB_ModePolicy_map"><area href="class_mode_policy_common_template.html" alt="ModePolicyCommonTemplate< AdditiveCipherAbstractPolicy >" shape="rect" coords="377,280,744,304"><area href="class_cipher_mode_base.html" alt="CipherModeBase" shape="rect" coords="188,224,555,248"><area href="struct_additive_cipher_abstract_policy.html" alt="AdditiveCipherAbstractPolicy" shape="rect" coords="565,224,932,248"><area href="class_symmetric_cipher.html" alt="SymmetricCipher" shape="rect" coords="188,168,555,192"><area href="class_stream_transformation.html" alt="StreamTransformation" shape="rect" coords="0,112,367,136"><area href="class_simple_keying_interface.html" alt="SimpleKeyingInterface" shape="rect" coords="377,112,744,136"><area href="class_algorithm.html" alt="Algorithm" shape="rect" coords="0,56,367,80"><area href="class_clonable.html" alt="Clonable" shape="rect" coords="0,0,367,24"></map><a href="class_o_f_b___mode_policy-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2><p><p>Definition at line <a class="el" href="modes_8h-source.html#l00123">123</a> of file <a class="el" href="modes_8h-source.html">modes.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Types</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6e">IV_Requirement</a> { <br> <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6e1cc32e69fe4f385e54d9d482a2ab5a56">UNIQUE_IV</a> = 0, <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6e4520c4379ee3a1aed95a36e2235ba338">RANDOM_IV</a>, <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6eceff3ad4b12bcb6d7b61a5bd543a815c">UNPREDICTABLE_RANDOM_IV</a>, <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6eb659bf6d2c470c50c14bfbab5b2d45ab">INTERNALLY_GENERATED_IV</a>, <br> <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6ec1d24de3dedd05c28516f452d3ace417">NOT_RESYNCHRONIZABLE</a><br> }</td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="506ca773e274a1e502e817ab16be4655"></a><!-- doxytag: member="OFB_ModePolicy::IsRandomAccess" ref="506ca773e274a1e502e817ab16be4655" args="() const" -->bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_f_b___mode_policy.html#506ca773e274a1e502e817ab16be4655">IsRandomAccess</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f8594eed79fc66094f525df05f5eba74"></a><!-- doxytag: member="OFB_ModePolicy::IVRequirement" ref="f8594eed79fc66094f525df05f5eba74" args="() const" --><a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6e">IV_Requirement</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_f_b___mode_policy.html#f8594eed79fc66094f525df05f5eba74">IVRequirement</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the minimal requirement for secure IVs <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca95bcde5d8f5be6f45c216c1d7b21f6"></a><!-- doxytag: member="OFB_ModePolicy::MinKeyLength" ref="ca95bcde5d8f5be6f45c216c1d7b21f6" args="() const" -->size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#ca95bcde5d8f5be6f45c216c1d7b21f6">MinKeyLength</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns smallest valid key length in bytes */ <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e801b0482663c7feae7db35e31d2508"></a><!-- doxytag: member="OFB_ModePolicy::MaxKeyLength" ref="8e801b0482663c7feae7db35e31d2508" args="() const" -->size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#8e801b0482663c7feae7db35e31d2508">MaxKeyLength</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns largest valid key length in bytes */ <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9b16d528a9a2657a7efbd85e45a80571"></a><!-- doxytag: member="OFB_ModePolicy::DefaultKeyLength" ref="9b16d528a9a2657a7efbd85e45a80571" args="() const" -->size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#9b16d528a9a2657a7efbd85e45a80571">DefaultKeyLength</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns default (recommended) key length in bytes */ <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d81c8b9da00b08f0696603e4992c57a"></a><!-- doxytag: member="OFB_ModePolicy::GetValidKeyLength" ref="0d81c8b9da00b08f0696603e4992c57a" args="(size_t n) const" -->size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#0d81c8b9da00b08f0696603e4992c57a">GetValidKeyLength</a> (size_t n) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the smallest valid key length in bytes that is >= min(n, GetMaxKeyLength()) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="47431eef8c1e41afd62b99a9e9202b58"></a><!-- doxytag: member="OFB_ModePolicy::IsValidKeyLength" ref="47431eef8c1e41afd62b99a9e9202b58" args="(size_t n) const" -->bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#47431eef8c1e41afd62b99a9e9202b58">IsValidKeyLength</a> (size_t n) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns whether n is a valid key length <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c534eff2d4e72b61cc848af0f94805de"></a><!-- doxytag: member="OFB_ModePolicy::OptimalDataAlignment" ref="c534eff2d4e72b61cc848af0f94805de" args="() const" -->unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#c534eff2d4e72b61cc848af0f94805de">OptimalDataAlignment</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns how input should be aligned for optimal performance <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="07313a860fd63d27f9b7aeeb8c2b36c2"></a><!-- doxytag: member="OFB_ModePolicy::IVSize" ref="07313a860fd63d27f9b7aeeb8c2b36c2" args="() const" -->unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_cipher_mode_base.html#07313a860fd63d27f9b7aeeb8c2b36c2">IVSize</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns size of IVs used by this object <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_stream_transformation.html">StreamTransformation</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#8c9304fff5af593ee68d3cf0d33c06e9">Ref</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">return a reference to this object, <a href="#8c9304fff5af593ee68d3cf0d33c06e9"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e224d250f716e82c54bc4e4c8930d188"></a><!-- doxytag: member="OFB_ModePolicy::MandatoryBlockSize" ref="e224d250f716e82c54bc4e4c8930d188" args="() const" -->virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#e224d250f716e82c54bc4e4c8930d188">MandatoryBlockSize</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns block size, if input must be processed in blocks, otherwise 1 <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#f66ef64545279c01310718af3d627534">OptimalBlockSize</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the input block size that is most efficient for this cipher <a href="#f66ef64545279c01310718af3d627534"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8422f6eee08fbc70069e222186e90de"></a><!-- doxytag: member="OFB_ModePolicy::GetOptimalBlockSizeUsed" ref="b8422f6eee08fbc70069e222186e90de" args="() const" -->virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#b8422f6eee08fbc70069e222186e90de">GetOptimalBlockSizeUsed</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns how much of the current block is used up <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#26feabde21bc4d1783195969733e3bb0">ProcessData</a> (byte *outString, const byte *inString, size_t length)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">encrypt or decrypt an array of bytes of specified length <a href="#26feabde21bc4d1783195969733e3bb0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#0668b78edaea082f87bf3e878c4c02f7">ProcessLastBlock</a> (byte *outString, const byte *inString, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">for ciphers where the last block of data is special, encrypt or decrypt the last block of data <a href="#0668b78edaea082f87bf3e878c4c02f7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b7c5bc41b9b5f6443ee32d65ebc044c"></a><!-- doxytag: member="OFB_ModePolicy::MinLastBlockSize" ref="0b7c5bc41b9b5f6443ee32d65ebc044c" args="() const" -->virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#0b7c5bc41b9b5f6443ee32d65ebc044c">MinLastBlockSize</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the minimum size of the last block, 0 indicating the last block is not special <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c00f3fcc21f33f11c8efa4de67ff7774"></a><!-- doxytag: member="OFB_ModePolicy::ProcessString" ref="c00f3fcc21f33f11c8efa4de67ff7774" args="(byte *inoutString, size_t length)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#c00f3fcc21f33f11c8efa4de67ff7774">ProcessString</a> (byte *inoutString, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">same as ProcessData(inoutString, inoutString, length) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="17951cb36412763e0d6bd9696177175d"></a><!-- doxytag: member="OFB_ModePolicy::ProcessString" ref="17951cb36412763e0d6bd9696177175d" args="(byte *outString, const byte *inString, size_t length)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#17951cb36412763e0d6bd9696177175d">ProcessString</a> (byte *outString, const byte *inString, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">same as ProcessData(outString, inString, length) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71a9bd33526fc7f227050075e7a78106"></a><!-- doxytag: member="OFB_ModePolicy::ProcessByte" ref="71a9bd33526fc7f227050075e7a78106" args="(byte input)" -->byte </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#71a9bd33526fc7f227050075e7a78106">ProcessByte</a> (byte input)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">implemented as {ProcessData(&input, &input, 1); return input;} <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7bfbac3f2e43b50d1e16e6b4b2d2e48a"></a><!-- doxytag: member="OFB_ModePolicy::Seek" ref="7bfbac3f2e43b50d1e16e6b4b2d2e48a" args="(lword n)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#7bfbac3f2e43b50d1e16e6b4b2d2e48a">Seek</a> (lword n)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">for random access ciphers, seek to an absolute position <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aad9b1fd9cceaf3641f03452da29534b"></a><!-- doxytag: member="OFB_ModePolicy::IsSelfInverting" ref="aad9b1fd9cceaf3641f03452da29534b" args="() const=0" -->virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_stream_transformation.html#aad9b1fd9cceaf3641f03452da29534b">IsSelfInverting</a> () const=0</td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -