mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-03 00:59:56 +01:00
469 lines
24 KiB
HTML
469 lines
24 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>AES (SubServers.Host)</title>
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="AES (SubServers.Host)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":9,"i1":9,"i2":9,"i3":9};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</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">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?net/ME1312/SubServers/Host/Network/AES.html" target="_top">Frames</a></li>
|
|
<li><a href="AES.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">net.ME1312.SubServers.Host.Network</div>
|
|
<h2 title="Class AES" class="title">Class AES</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>net.ME1312.SubServers.Host.Network.AES</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public final class <span class="typeNameLabel">AES</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">A class to perform password-based AES encryption and decryption in CBC mode.
|
|
128, 192, and 256-bit encryption are supported, provided that the latter two
|
|
are permitted by the Java runtime's jurisdiction policy files.
|
|
<br/>
|
|
The public interface for this class consists of the static methods
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-"><code>encrypt(int, java.lang.String, java.io.InputStream, java.io.OutputStream)</code></a> and <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#decrypt-java.lang.String-java.io.InputStream-java.io.OutputStream-"><code>decrypt(java.lang.String, java.io.InputStream, java.io.OutputStream)</code></a>, which encrypt and decrypt arbitrary
|
|
streams of data, respectively.</div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>dweymouth@gmail.com</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Class and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidAESStreamException</a></span></code>
|
|
<div class="block">Thrown if an attempt is made to decrypt an invalid AES stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidKeyLengthException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidKeyLengthException</a></span></code>
|
|
<div class="block">Thrown if an attempt is made to encrypt a stream with an invalid AES key length.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidPasswordException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidPasswordException</a></span></code>
|
|
<div class="block">Thrown if an attempt is made to decrypt a stream with an incorrect password.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a></span></code>
|
|
<div class="block">Thrown if 192- or 256-bit AES encryption or decryption is attempted,
|
|
but not available on the particular Java platform.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#AES--">AES</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../net/ME1312/SubServers/Host/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Host.Library">NamedContainer</a><java.lang.Integer,java.lang.String></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#decrypt-java.lang.String-byte:A-">decrypt</a></span>(java.lang.String password,
|
|
byte[] input)</code>
|
|
<div class="block">Decrypts a stream of data that was encrypted by <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-"><code>encrypt(int, java.lang.String, java.io.InputStream, java.io.OutputStream)</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#decrypt-java.lang.String-java.io.InputStream-java.io.OutputStream-">decrypt</a></span>(java.lang.String password,
|
|
java.io.InputStream input,
|
|
java.io.OutputStream output)</code>
|
|
<div class="block">Decrypts a stream of data that was encrypted by <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-"><code>encrypt(int, java.lang.String, java.io.InputStream, java.io.OutputStream)</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-">encrypt</a></span>(int keyLength,
|
|
java.lang.String password,
|
|
java.io.InputStream input,
|
|
java.io.OutputStream output)</code>
|
|
<div class="block">Encrypts a stream of data.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.lang.String-">encrypt</a></span>(int keyLength,
|
|
java.lang.String password,
|
|
java.lang.String input)</code>
|
|
<div class="block">Encrypts a stream of data.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="AES--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>AES</h4>
|
|
<pre>public AES()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>encrypt</h4>
|
|
<pre>public static void encrypt(int keyLength,
|
|
java.lang.String password,
|
|
java.io.InputStream input,
|
|
java.io.OutputStream output)
|
|
throws <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidKeyLengthException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidKeyLengthException</a>,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a>,
|
|
java.io.IOException</pre>
|
|
<div class="block">Encrypts a stream of data. The encrypted stream consists of a header
|
|
followed by the raw AES data. The header is broken down as follows:<br/>
|
|
<ul>
|
|
<li><b>keyLength</b>: AES key length in bytes (valid for 16, 24, 32) (1 byte)</li>
|
|
<li><b>salt</b>: pseudorandom salt used to derive keys from password (16 bytes)</li>
|
|
<li><b>authentication key</b> (derived from password and salt, used to
|
|
check validity of password upon decryption) (8 bytes)</li>
|
|
<li><b>IV</b>: pseudorandom AES initialization vector (16 bytes)</li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyLength</code> - key length to use for AES encryption (must be 128, 192, or 256)</dd>
|
|
<dd><code>password</code> - password to use for encryption</dd>
|
|
<dd><code>input</code> - an arbitrary byte stream to encrypt</dd>
|
|
<dd><code>output</code> - stream to which encrypted data will be written</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidKeyLengthException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidKeyLengthException</a></code> - if keyLength is not 128, 192, or 256</dd>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a></code> - if keyLength is 192 or 256, but the Java runtime's jurisdiction
|
|
policy files do not allow 192- or 256-bit encryption</dd>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="encrypt-int-java.lang.String-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>encrypt</h4>
|
|
<pre>public static byte[] encrypt(int keyLength,
|
|
java.lang.String password,
|
|
java.lang.String input)
|
|
throws java.io.IOException,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a>,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidKeyLengthException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidKeyLengthException</a></pre>
|
|
<div class="block">Encrypts a stream of data. The encrypted stream consists of a header
|
|
followed by the raw AES data. The header is broken down as follows:<br/>
|
|
<ul>
|
|
<li><b>keyLength</b>: AES key length in bytes (valid for 16, 24, 32) (1 byte)</li>
|
|
<li><b>salt</b>: pseudorandom salt used to derive keys from password (16 bytes)</li>
|
|
<li><b>authentication key</b> (derived from password and salt, used to
|
|
check validity of password upon decryption) (8 bytes)</li>
|
|
<li><b>IV</b>: pseudorandom AES initialization vector (16 bytes)</li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyLength</code> - key length to use for AES encryption (must be 128, 192, or 256)</dd>
|
|
<dd><code>password</code> - password to use for encryption</dd>
|
|
<dd><code>input</code> - an arbitrary string to encrypt</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>string containing the encrypted data</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidKeyLengthException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidKeyLengthException</a></code> - if keyLength is not 128, 192, or 256</dd>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a></code> - if keyLength is 192 or 256, but the Java runtime's jurisdiction
|
|
policy files do not allow 192- or 256-bit encryption</dd>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="decrypt-java.lang.String-java.io.InputStream-java.io.OutputStream-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>decrypt</h4>
|
|
<pre>public static int decrypt(java.lang.String password,
|
|
java.io.InputStream input,
|
|
java.io.OutputStream output)
|
|
throws <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidPasswordException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidPasswordException</a>,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidAESStreamException</a>,
|
|
java.io.IOException,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a></pre>
|
|
<div class="block">Decrypts a stream of data that was encrypted by <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-"><code>encrypt(int, java.lang.String, java.io.InputStream, java.io.OutputStream)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>password</code> - the password used to encrypt/decrypt the stream</dd>
|
|
<dd><code>input</code> - stream of encrypted data to be decrypted</dd>
|
|
<dd><code>output</code> - stream to which decrypted data will be written</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the key length for the decrypted stream (128, 192, or 256)</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidPasswordException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidPasswordException</a></code> - if the given password was not used to encrypt the data</dd>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidAESStreamException</a></code> - if the given input stream is not a valid AES-encrypted stream</dd>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a></code> - if the stream is 192 or 256-bit encrypted, and the Java runtime's
|
|
jurisdiction policy files do not allow for AES-192 or 256</dd>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="decrypt-java.lang.String-byte:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>decrypt</h4>
|
|
<pre>public static <a href="../../../../../net/ME1312/SubServers/Host/Library/NamedContainer.html" title="class in net.ME1312.SubServers.Host.Library">NamedContainer</a><java.lang.Integer,java.lang.String> decrypt(java.lang.String password,
|
|
byte[] input)
|
|
throws java.io.IOException,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a>,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidAESStreamException</a>,
|
|
<a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidPasswordException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidPasswordException</a></pre>
|
|
<div class="block">Decrypts a stream of data that was encrypted by <a href="../../../../../net/ME1312/SubServers/Host/Network/AES.html#encrypt-int-java.lang.String-java.io.InputStream-java.io.OutputStream-"><code>encrypt(int, java.lang.String, java.io.InputStream, java.io.OutputStream)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>password</code> - the password used to encrypt/decrypt the string</dd>
|
|
<dd><code>input</code> - string of encrypted data to be decrypted</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the key length for the decrypted string (128, 192, or 256) and the string of decrypted data</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidPasswordException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidPasswordException</a></code> - if the given password was not used to encrypt the data</dd>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network">AES.InvalidAESStreamException</a></code> - if the given input stream is not a valid AES-encrypted stream</dd>
|
|
<dd><code><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.StrongEncryptionNotAvailableException.html" title="class in net.ME1312.SubServers.Host.Network">AES.StrongEncryptionNotAvailableException</a></code> - if the stream is 192 or 256-bit encrypted, and the Java runtime's
|
|
jurisdiction policy files do not allow for AES-192 or 256</dd>
|
|
<dd><code>java.io.IOException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</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">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../../net/ME1312/SubServers/Host/Network/AES.InvalidAESStreamException.html" title="class in net.ME1312.SubServers.Host.Network"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?net/ME1312/SubServers/Host/Network/AES.html" target="_top">Frames</a></li>
|
|
<li><a href="AES.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses-noframe.html">All 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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|