Some code formatting.
This commit is contained in:
@@ -1215,7 +1215,7 @@ public final class BlowfishEngine
|
||||
* @throws IllegalStateException The cipher was not yet initialized
|
||||
* @throws IOException The source array is too small to hold a block at the given index
|
||||
*/
|
||||
public void tryEncryptBlock(byte[] src, final int srcIndex) throws IOException
|
||||
public void tryEncryptBlock(byte[] src, int srcIndex) throws IOException
|
||||
{
|
||||
if (workingKey == null)
|
||||
{
|
||||
@@ -1239,7 +1239,7 @@ public final class BlowfishEngine
|
||||
* @throws IllegalStateException The cipher was not yet initialized
|
||||
* @throws IOException The source or destination array is too small to hold a block at the given index
|
||||
*/
|
||||
public void tryEncryptBlock(final byte[] src, final int srcIndex, byte[] dst, final int dstIndex) throws IOException
|
||||
public void tryEncryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex) throws IOException
|
||||
{
|
||||
if (workingKey == null)
|
||||
{
|
||||
@@ -1269,7 +1269,7 @@ public final class BlowfishEngine
|
||||
* @param src source array with the plain data
|
||||
* @param srcIndex index where the block to encrypt is located
|
||||
*/
|
||||
public void encryptBlock(byte[] src, final int srcIndex)
|
||||
public void encryptBlock(byte[] src, int srcIndex)
|
||||
{
|
||||
encryptBlock(src, srcIndex, src, srcIndex);
|
||||
}
|
||||
@@ -1288,7 +1288,7 @@ public final class BlowfishEngine
|
||||
* @param dst destination array the encryption will go to
|
||||
* @param dstIndex index where the encrypted block is to be stored
|
||||
*/
|
||||
public void encryptBlock(final byte[] src, final int srcIndex, byte[] dst, final int dstIndex)
|
||||
public void encryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex)
|
||||
{
|
||||
int xl = bytesTo32bits(src, srcIndex);
|
||||
int xr = bytesTo32bits(src, srcIndex + 4);
|
||||
@@ -1325,7 +1325,7 @@ public final class BlowfishEngine
|
||||
* @throws IllegalStateException The cipher was not yet initialized
|
||||
* @throws IOException The source array is too small to hold a block at the given index
|
||||
*/
|
||||
public void tryDecryptBlock(byte[] src, final int srcIndex) throws IOException
|
||||
public void tryDecryptBlock(byte[] src, int srcIndex) throws IOException
|
||||
{
|
||||
if (workingKey == null)
|
||||
{
|
||||
@@ -1348,7 +1348,7 @@ public final class BlowfishEngine
|
||||
* @throws IllegalStateException The cipher was not yet initialized
|
||||
* @throws IOException The source or destination array is too small to hold a block at the given index
|
||||
*/
|
||||
public void tryDecryptBlock(final byte[] src, final int srcIndex, byte[] dst, final int dstIndex) throws IOException
|
||||
public void tryDecryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex) throws IOException
|
||||
{
|
||||
if (workingKey == null)
|
||||
{
|
||||
@@ -1378,7 +1378,7 @@ public final class BlowfishEngine
|
||||
* @param src source array with the encrypted data
|
||||
* @param srcIndex index where the block to decrypt is located
|
||||
*/
|
||||
public void decryptBlock(byte[] src, final int srcIndex)
|
||||
public void decryptBlock(byte[] src, int srcIndex)
|
||||
{
|
||||
decryptBlock(src, srcIndex, src, srcIndex);
|
||||
}
|
||||
@@ -1398,7 +1398,7 @@ public final class BlowfishEngine
|
||||
* @param dstIndex index where the decrypted block is to be stored
|
||||
* @throws IllegalStateException The cipher was not yet initialized
|
||||
*/
|
||||
public void decryptBlock(final byte[] src, final int srcIndex, byte[] dst, final int dstIndex)
|
||||
public void decryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex)
|
||||
{
|
||||
int xl = bytesTo32bits(src, srcIndex);
|
||||
int xr = bytesTo32bits(src, srcIndex + 4);
|
||||
|
@@ -66,7 +66,7 @@ public class LoginCrypt
|
||||
* @return true when checksum could be verified, false otherwise
|
||||
* @throws IOException the size is not multiple of blowfishs block size or the raw array can't hold size bytes starting at offset due to it's size
|
||||
*/
|
||||
public boolean decrypt(byte[] raw, final int offset, final int size) throws IOException
|
||||
public boolean decrypt(byte[] raw, int offset, int size) throws IOException
|
||||
{
|
||||
if ((size % 8) != 0)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ public class LoginCrypt
|
||||
* @return the new array size
|
||||
* @throws IOException packet is too long to make padding and add verification data
|
||||
*/
|
||||
public int encrypt(byte[] raw, final int offset, int size) throws IOException
|
||||
public int encrypt(byte[] raw, int offset, int size) throws IOException
|
||||
{
|
||||
// reserve checksum
|
||||
size += 4;
|
||||
|
@@ -47,7 +47,7 @@ public final class NewCrypt
|
||||
* @param raw data array to be verified
|
||||
* @return true when the checksum of the data is valid, false otherwise
|
||||
*/
|
||||
public static boolean verifyChecksum(final byte[] raw)
|
||||
public static boolean verifyChecksum(byte[] raw)
|
||||
{
|
||||
return NewCrypt.verifyChecksum(raw, 0, raw.length);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public final class NewCrypt
|
||||
* @param size number of bytes to verify
|
||||
* @return true if the checksum of the data is valid, false otherwise
|
||||
*/
|
||||
public static boolean verifyChecksum(final byte[] raw, final int offset, final int size)
|
||||
public static boolean verifyChecksum(byte[] raw, int offset, int size)
|
||||
{
|
||||
// check if size is multiple of 4 and if there is more then only the checksum
|
||||
if (((size & 3) != 0) || (size <= 4))
|
||||
@@ -95,7 +95,7 @@ public final class NewCrypt
|
||||
* Equivalent to calling {@link #appendChecksum(byte[], int, int)} with parameters (raw, 0, raw.length)
|
||||
* @param raw data array to compute the checksum from
|
||||
*/
|
||||
public static void appendChecksum(final byte[] raw)
|
||||
public static void appendChecksum(byte[] raw)
|
||||
{
|
||||
NewCrypt.appendChecksum(raw, 0, raw.length);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public final class NewCrypt
|
||||
* @param offset offset where to start in the data array
|
||||
* @param size number of bytes to compute the checksum from
|
||||
*/
|
||||
public static void appendChecksum(final byte[] raw, final int offset, final int size)
|
||||
public static void appendChecksum(byte[] raw, int offset, int size)
|
||||
{
|
||||
long chksum = 0;
|
||||
final int count = size - 4;
|
||||
@@ -153,7 +153,7 @@ public final class NewCrypt
|
||||
* @param size Length of the data to be encrypted
|
||||
* @param key The 4 bytes (int) XOR key
|
||||
*/
|
||||
static void encXORPass(byte[] raw, final int offset, final int size, int key)
|
||||
static void encXORPass(byte[] raw, int offset, int size, int key)
|
||||
{
|
||||
final int stop = size - 8;
|
||||
int pos = 4 + offset;
|
||||
@@ -192,7 +192,7 @@ public final class NewCrypt
|
||||
* @param offset the offset at which to start decrypting
|
||||
* @param size the number of bytes to be decrypted
|
||||
*/
|
||||
public void decrypt(byte[] raw, final int offset, final int size)
|
||||
public void decrypt(byte[] raw, int offset, int size)
|
||||
{
|
||||
for (int i = offset; i < (offset + size); i += 8)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ public final class NewCrypt
|
||||
* @param offset the offset at which to start decrypting
|
||||
* @param size the number of bytes to be decrypted
|
||||
*/
|
||||
public void crypt(byte[] raw, final int offset, final int size)
|
||||
public void crypt(byte[] raw, int offset, int size)
|
||||
{
|
||||
for (int i = offset; i < (offset + size); i += 8)
|
||||
{
|
||||
|
Reference in New Issue
Block a user