460 lines
18 KiB
HTML
460 lines
18 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>
|
||
|
|
Class: Rex::Exploit::ViewState
|
||
|
|
|
||
|
|
— Documentation by YARD 0.9.37
|
||
|
|
|
||
|
|
</title>
|
||
|
|
|
||
|
|
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||
|
|
|
||
|
|
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
pathId = "Rex::Exploit::ViewState";
|
||
|
|
relpath = '../../';
|
||
|
|
</script>
|
||
|
|
|
||
|
|
|
||
|
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||
|
|
|
||
|
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||
|
|
|
||
|
|
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="nav_wrap">
|
||
|
|
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||
|
|
<div id="resizer"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="main" tabindex="-1">
|
||
|
|
<div id="header">
|
||
|
|
<div id="menu">
|
||
|
|
|
||
|
|
<a href="../../_index.html">Index (V)</a> »
|
||
|
|
<span class='title'><span class='object_link'><a href="../../Rex.html" title="Rex (module)">Rex</a></span></span> » <span class='title'><span class='object_link'><a href="../Exploit.html" title="Rex::Exploit (module)">Exploit</a></span></span>
|
||
|
|
»
|
||
|
|
<span class="title">ViewState</span>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="search">
|
||
|
|
|
||
|
|
<a class="full_list_link" id="class_list_link"
|
||
|
|
href="../../class_list.html">
|
||
|
|
|
||
|
|
<svg width="24" height="24">
|
||
|
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||
|
|
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||
|
|
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||
|
|
</svg>
|
||
|
|
</a>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="clear"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="content"><h1>Class: Rex::Exploit::ViewState
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h1>
|
||
|
|
<div class="box_info">
|
||
|
|
|
||
|
|
<dl>
|
||
|
|
<dt>Inherits:</dt>
|
||
|
|
<dd>
|
||
|
|
<span class="inheritName">Object</span>
|
||
|
|
|
||
|
|
<ul class="fullTree">
|
||
|
|
<li>Object</li>
|
||
|
|
|
||
|
|
<li class="next">Rex::Exploit::ViewState</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
<a href="#" class="inheritanceTree">show all</a>
|
||
|
|
|
||
|
|
</dd>
|
||
|
|
</dl>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<dl>
|
||
|
|
<dt>Defined in:</dt>
|
||
|
|
<dd>lib/rex/exploit/view_state.rb</dd>
|
||
|
|
</dl>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<h2>Defined Under Namespace</h2>
|
||
|
|
<p class="children">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<strong class="classes">Classes:</strong> <span class='object_link'><a href="ViewState/Error.html" title="Rex::Exploit::ViewState::Error (class)">Error</a></span>
|
||
|
|
|
||
|
|
|
||
|
|
</p>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<h2>
|
||
|
|
Class Method Summary
|
||
|
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||
|
|
</h2>
|
||
|
|
|
||
|
|
<ul class="summary">
|
||
|
|
|
||
|
|
<li class="public ">
|
||
|
|
<span class="summary_signature">
|
||
|
|
|
||
|
|
<a href="#decode_viewstate-class_method" title="decode_viewstate (class method)">.<strong>decode_viewstate</strong>(encoded_viewstate, algo: 'sha1') ⇒ Object </a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
<li class="public ">
|
||
|
|
<span class="summary_signature">
|
||
|
|
|
||
|
|
<a href="#generate_viewstate-class_method" title="generate_viewstate (class method)">.<strong>generate_viewstate</strong>(data, extra: '', algo: 'sha1', key: '') ⇒ Object </a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
<li class="public ">
|
||
|
|
<span class="summary_signature">
|
||
|
|
|
||
|
|
<a href="#generate_viewstate_hmac-class_method" title="generate_viewstate_hmac (class method)">.<strong>generate_viewstate_hmac</strong>(data, algo: 'sha1', key: '') ⇒ Object </a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
<li class="public ">
|
||
|
|
<span class="summary_signature">
|
||
|
|
|
||
|
|
<a href="#is_viewstate_valid%3F-class_method" title="is_viewstate_valid? (class method)">.<strong>is_viewstate_valid?</strong>(encoded_viewstate, extra: '', algo: 'sha1', key: '') ⇒ Boolean </a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
(also: can_sign_viewstate?)
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div id="class_method_details" class="method_details_list">
|
||
|
|
<h2>Class Method Details</h2>
|
||
|
|
|
||
|
|
|
||
|
|
<div class="method_details first">
|
||
|
|
<h3 class="signature first" id="decode_viewstate-class_method">
|
||
|
|
|
||
|
|
.<strong>decode_viewstate</strong>(encoded_viewstate, algo: 'sha1') ⇒ <tt>Object</tt>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h3><table class="source_code">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<pre class="lines">
|
||
|
|
|
||
|
|
|
||
|
|
9
|
||
|
|
10
|
||
|
|
11
|
||
|
|
12
|
||
|
|
13
|
||
|
|
14
|
||
|
|
15
|
||
|
|
16
|
||
|
|
17
|
||
|
|
18
|
||
|
|
19
|
||
|
|
20
|
||
|
|
21
|
||
|
|
22
|
||
|
|
23
|
||
|
|
24
|
||
|
|
25
|
||
|
|
26
|
||
|
|
27
|
||
|
|
28</pre>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<pre class="code"><span class="info file"># File 'lib/rex/exploit/view_state.rb', line 9</span>
|
||
|
|
|
||
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_decode_viewstate'>decode_viewstate</span><span class='lparen'>(</span><span class='id identifier rubyid_encoded_viewstate'>encoded_viewstate</span><span class='comma'>,</span> <span class='label'>algo:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sha1</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='id identifier rubyid_viewstate'>viewstate</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'>Text</span><span class='period'>.</span><span class='id identifier rubyid_decode_base64'>decode_base64</span><span class='lparen'>(</span><span class='id identifier rubyid_encoded_viewstate'>encoded_viewstate</span><span class='rparen'>)</span>
|
||
|
|
|
||
|
|
<span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'>Text</span><span class='period'>.</span><span class='id identifier rubyid_encode_base64'>encode_base64</span><span class='lparen'>(</span><span class='id identifier rubyid_viewstate'>viewstate</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='id identifier rubyid_encoded_viewstate'>encoded_viewstate</span>
|
||
|
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ViewState/Error.html" title="Rex::Exploit::ViewState::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Could not decode ViewState</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span>
|
||
|
|
|
||
|
|
<span class='id identifier rubyid_hmac_len'>hmac_len</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>Digest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_algo'>algo</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_digest_length'>digest_length</span>
|
||
|
|
|
||
|
|
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_viewstate'>viewstate</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='op'>-</span><span class='id identifier rubyid_hmac_len'>hmac_len</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
||
|
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
||
|
|
<span class='kw'>end</span>
|
||
|
|
|
||
|
|
<span class='id identifier rubyid_hmac'>hmac</span> <span class='op'>=</span> <span class='id identifier rubyid_viewstate'>viewstate</span><span class='lbracket'>[</span><span class='op'>-</span><span class='id identifier rubyid_hmac_len'>hmac_len</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
|
||
|
|
<span class='kw'>unless</span> <span class='id identifier rubyid_hmac'>hmac</span><span class='op'>&.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='id identifier rubyid_hmac_len'>hmac_len</span>
|
||
|
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ViewState/Error.html" title="Rex::Exploit::ViewState::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Could not decode ViewState</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span>
|
||
|
|
|
||
|
|
<span class='lbrace'>{</span> <span class='label'>data:</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='label'>hmac:</span> <span class='id identifier rubyid_hmac'>hmac</span> <span class='rbrace'>}</span>
|
||
|
|
<span class='kw'>end</span></pre>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method_details ">
|
||
|
|
<h3 class="signature " id="generate_viewstate-class_method">
|
||
|
|
|
||
|
|
.<strong>generate_viewstate</strong>(data, extra: '', algo: 'sha1', key: '') ⇒ <tt>Object</tt>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h3><table class="source_code">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<pre class="lines">
|
||
|
|
|
||
|
|
|
||
|
|
30
|
||
|
|
31
|
||
|
|
32
|
||
|
|
33
|
||
|
|
34
|
||
|
|
35
|
||
|
|
36</pre>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<pre class="code"><span class="info file"># File 'lib/rex/exploit/view_state.rb', line 30</span>
|
||
|
|
|
||
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_generate_viewstate'>generate_viewstate</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='label'>extra:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>algo:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sha1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>key:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='comment'># Generate ViewState HMAC from known values and validation key
|
||
|
|
</span> <span class='id identifier rubyid_hmac'>hmac</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_viewstate_hmac'>generate_viewstate_hmac</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span> <span class='op'>+</span> <span class='id identifier rubyid_extra'>extra</span><span class='comma'>,</span> <span class='label'>algo:</span> <span class='id identifier rubyid_algo'>algo</span><span class='comma'>,</span> <span class='label'>key:</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
||
|
|
|
||
|
|
<span class='comment'># Append HMAC to provided data and Base64-encode the whole shebang
|
||
|
|
</span> <span class='const'><span class='object_link'><a href="../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'>Text</span><span class='period'>.</span><span class='id identifier rubyid_encode_base64'>encode_base64</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span> <span class='op'>+</span> <span class='id identifier rubyid_hmac'>hmac</span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span></pre>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method_details ">
|
||
|
|
<h3 class="signature " id="generate_viewstate_hmac-class_method">
|
||
|
|
|
||
|
|
.<strong>generate_viewstate_hmac</strong>(data, algo: 'sha1', key: '') ⇒ <tt>Object</tt>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h3><table class="source_code">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<pre class="lines">
|
||
|
|
|
||
|
|
|
||
|
|
38
|
||
|
|
39
|
||
|
|
40</pre>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<pre class="code"><span class="info file"># File 'lib/rex/exploit/view_state.rb', line 38</span>
|
||
|
|
|
||
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_generate_viewstate_hmac'>generate_viewstate_hmac</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='label'>algo:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sha1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>key:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>HMAC</span><span class='period'>.</span><span class='id identifier rubyid_digest'>digest</span><span class='lparen'>(</span><span class='id identifier rubyid_algo'>algo</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span></pre>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method_details ">
|
||
|
|
<h3 class="signature " id="is_viewstate_valid?-class_method">
|
||
|
|
|
||
|
|
.<strong>is_viewstate_valid?</strong>(encoded_viewstate, extra: '', algo: 'sha1', key: '') ⇒ <tt>Boolean</tt>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="aliases">Also known as:
|
||
|
|
<span class="names"><span id='can_sign_viewstate?-class_method'>can_sign_viewstate?</span></span>
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h3><div class="docstring">
|
||
|
|
<div class="discussion">
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="tags">
|
||
|
|
|
||
|
|
<p class="tag_title">Returns:</p>
|
||
|
|
<ul class="return">
|
||
|
|
|
||
|
|
<li>
|
||
|
|
|
||
|
|
|
||
|
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
</div><table class="source_code">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<pre class="lines">
|
||
|
|
|
||
|
|
|
||
|
|
42
|
||
|
|
43
|
||
|
|
44
|
||
|
|
45
|
||
|
|
46
|
||
|
|
47
|
||
|
|
48
|
||
|
|
49
|
||
|
|
50
|
||
|
|
51
|
||
|
|
52
|
||
|
|
53
|
||
|
|
54
|
||
|
|
55
|
||
|
|
56
|
||
|
|
57
|
||
|
|
58
|
||
|
|
59
|
||
|
|
60
|
||
|
|
61</pre>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<pre class="code"><span class="info file"># File 'lib/rex/exploit/view_state.rb', line 42</span>
|
||
|
|
|
||
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_viewstate_valid?'>is_viewstate_valid?</span><span class='lparen'>(</span><span class='id identifier rubyid_encoded_viewstate'>encoded_viewstate</span><span class='comma'>,</span> <span class='label'>extra:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>algo:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sha1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>key:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='id identifier rubyid_viewstate'>viewstate</span> <span class='op'>=</span> <span class='id identifier rubyid_decode_viewstate'>decode_viewstate</span><span class='lparen'>(</span><span class='id identifier rubyid_encoded_viewstate'>encoded_viewstate</span><span class='rparen'>)</span>
|
||
|
|
|
||
|
|
<span class='kw'>unless</span> <span class='id identifier rubyid_viewstate'>viewstate</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span>
|
||
|
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ViewState/Error.html" title="Rex::Exploit::ViewState::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Could not retrieve ViewState data</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span>
|
||
|
|
|
||
|
|
<span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_their_hmac'>their_hmac</span> <span class='op'>=</span> <span class='id identifier rubyid_viewstate'>viewstate</span><span class='lbracket'>[</span><span class='symbol'>:hmac</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||
|
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ViewState/Error.html" title="Rex::Exploit::ViewState::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Could not retrieve ViewState HMAC</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span>
|
||
|
|
|
||
|
|
<span class='id identifier rubyid_our_hmac'>our_hmac</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_viewstate_hmac'>generate_viewstate_hmac</span><span class='lparen'>(</span>
|
||
|
|
<span class='id identifier rubyid_viewstate'>viewstate</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_extra'>extra</span><span class='comma'>,</span>
|
||
|
|
<span class='label'>algo:</span> <span class='id identifier rubyid_algo'>algo</span><span class='comma'>,</span>
|
||
|
|
<span class='label'>key:</span> <span class='id identifier rubyid_key'>key</span>
|
||
|
|
<span class='rparen'>)</span>
|
||
|
|
|
||
|
|
<span class='comment'># Do we have what it takes?
|
||
|
|
</span> <span class='id identifier rubyid_our_hmac'>our_hmac</span> <span class='op'>==</span> <span class='id identifier rubyid_their_hmac'>their_hmac</span>
|
||
|
|
<span class='kw'>end</span></pre>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="footer">
|
||
|
|
Generated on Fri May 8 17:04:13 2026 by
|
||
|
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||
|
|
0.9.37 (ruby-3.1.5).
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|