blob: 21524d1ee8a3ac586667de9d8550f1b17d86d7cf [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.6) on Mon Mar 23 13:33:10 EDT 2020 -->
<title>HashRequest (Apache Shiro :: Cryptography :: Hashing 1.5.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-03-23">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HashRequest (Apache Shiro :: Cryptography :: Hashing 1.5.2 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HashRequest.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.shiro.crypto.hash</a></div>
<h2 title="Interface HashRequest" class="title">Interface HashRequest</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="SimpleHashRequest.html" title="class in org.apache.shiro.crypto.hash">SimpleHashRequest</a></code></dd>
</dl>
<hr>
<pre>public interface <a href="../../../../../src-html/org/apache/shiro/crypto/hash/HashRequest.html#line.31">HashRequest</a></pre>
<div class="block">A <code>HashRequest</code> is composed of data that will be used by a <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a> to compute a hash (aka
'digest'). While you can instantiate a concrete <code>HashRequest</code> class directly, most will find using the
<a href="HashRequest.Builder.html" title="class in org.apache.shiro.crypto.hash"><code>HashRequest.Builder</code></a> more convenient.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="HashRequest.Builder.html" title="class in org.apache.shiro.crypto.hash"><code>HashRequest.Builder</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HashRequest.Builder.html" title="class in org.apache.shiro.crypto.hash">HashRequest.Builder</a></span></code></th>
<td class="colLast">
<div class="block">A Builder class representing the Builder design pattern for constructing <a href="HashRequest.html" title="interface in org.apache.shiro.crypto.hash"><code>HashRequest</code></a> instances.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAlgorithmName()">getAlgorithmName</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the name of the hash algorithm the <code>HashService</code> should use when computing the <a href="Hash.html" title="interface in org.apache.shiro.crypto.hash"><code>Hash</code></a>, or
<code>null</code> if the default algorithm configuration of the <code>HashService</code> should be used.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIterations()">getIterations</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of requested hash iterations to be performed when computing the final <code>Hash</code> result.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>org.apache.shiro.util.ByteSource</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSalt()">getSalt</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a salt to be used by the <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a> during hash computation, or <code>null</code> if no salt is
provided as part of the request.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>org.apache.shiro.util.ByteSource</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSource()">getSource</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the source data that will be hashed by a <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getSource()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSource</h4>
<pre class="methodSignature">org.apache.shiro.util.ByteSource&nbsp;<a href="../../../../../src-html/org/apache/shiro/crypto/hash/HashRequest.html#line.39">getSource</a>()</pre>
<div class="block">Returns the source data that will be hashed by a <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a>. For example, this might be a
<code>ByteSource</code> representation of a password, or file, etc.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the source data that will be hashed by a <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a>.</dd>
</dl>
</li>
</ul>
<a id="getSalt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSalt</h4>
<pre class="methodSignature">org.apache.shiro.util.ByteSource&nbsp;<a href="../../../../../src-html/org/apache/shiro/crypto/hash/HashRequest.html#line.52">getSalt</a>()</pre>
<div class="block">Returns a salt to be used by the <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a> during hash computation, or <code>null</code> if no salt is
provided as part of the request.
<p/>
Note that a <code>null</code> value does not necessarily mean a salt won't be used at all - it just
means that the request didn't include one. The servicing <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a> is free to provide a salting
strategy for a request, even if the request did not specify one.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a salt to be used by the <a href="HashService.html" title="interface in org.apache.shiro.crypto.hash"><code>HashService</code></a> during hash computation, or <code>null</code> if no salt is
provided as part of the request.</dd>
</dl>
</li>
</ul>
<a id="getIterations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIterations</h4>
<pre class="methodSignature">int&nbsp;<a href="../../../../../src-html/org/apache/shiro/crypto/hash/HashRequest.html#line.64">getIterations</a>()</pre>
<div class="block">Returns the number of requested hash iterations to be performed when computing the final <code>Hash</code> result.
A non-positive (0 or less) indicates that the <code>HashService</code>'s default iteration configuration should
be used. A positive value overrides the <code>HashService</code>'s configuration for a single request.
<p/>
Note that a <code>HashService</code> is free to ignore this number if it determines the number is not sufficient
to meet a desired level of security.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of requested hash iterations to be performed when computing the final <code>Hash</code> result.</dd>
</dl>
</li>
</ul>
<a id="getAlgorithmName()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAlgorithmName</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/crypto/hash/HashRequest.html#line.77">getAlgorithmName</a>()</pre>
<div class="block">Returns the name of the hash algorithm the <code>HashService</code> should use when computing the <a href="Hash.html" title="interface in org.apache.shiro.crypto.hash"><code>Hash</code></a>, or
<code>null</code> if the default algorithm configuration of the <code>HashService</code> should be used. A non-null value
overrides the <code>HashService</code>'s configuration for a single request.
<p/>
Note that a <code>HashService</code> is free to ignore this value if it determines that the algorithm is not
sufficient to meet a desired level of security.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of the hash algorithm the <code>HashService</code> should use when computing the <a href="Hash.html" title="interface in org.apache.shiro.crypto.hash"><code>Hash</code></a>, or
<code>null</code> if the default algorithm configuration of the <code>HashService</code> should be used.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HashRequest.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2004&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>