Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbdb9acf

Browse files
committed
fix bugs in AES.java(TheAlgorithms#765)
1 parent3b70b8c commitbdb9acf

File tree

3 files changed

+7
-280
lines changed

3 files changed

+7
-280
lines changed

‎DataStructures/Lists/CircleLinkedList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public E remove(int pos) {
5252
before =before.next;
5353
}
5454
Esaved =iterator.value;
55-
// assigning the nextreferance to the the element following the element we want to remove... the last element will be assigned to the head.
55+
// assigning the nextreference to the the element following the element we want to remove... the last element will be assigned to the head.
5656
before.next =iterator.next;
5757
// scrubbing
5858
iterator.next =null;

‎DataStructures/Matrix/Matrix.java

Lines changed: 0 additions & 269 deletions
This file was deleted.

‎ciphers/AES.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
/**
77
* This class is build to demonstrate the application of the AES-algorithm on a
88
* single 128-Bit block of data.
9-
*
10-
* @see khalil2535
9+
*
1110
*/
1211
publicclassAES {
1312

@@ -202,8 +201,7 @@ public static BigInteger scheduleCore(BigInteger t, int rconCounter) {
202201
StringrBytes =t.toString(16);
203202

204203
// Add zero padding
205-
intrBytesLength =rBytes.length();
206-
while (rBytesLength <8) {
204+
while (rBytes.length() <8) {
207205
rBytes ="0" +rBytes;
208206
}
209207

@@ -228,8 +226,8 @@ public static BigInteger scheduleCore(BigInteger t, int rconCounter) {
228226
currentByteBits =Integer.toHexString(currentByte);
229227

230228
// Add zero padding
231-
intcurrentByteBitsLength =currentByteBits.length();
232-
while (currentByteBitsLength <2) {
229+
230+
while (currentByteBits.length() <2) {
233231
currentByteBits ='0' +currentByteBits;
234232
}
235233

@@ -304,8 +302,7 @@ public static int[] splitBlockIntoCells(BigInteger block) {
304302
StringblockBits =block.toString(2);
305303

306304
// Append leading 0 for full "128-bit" string
307-
intblockBitsLength =blockBits.length();
308-
while (blockBitsLength <128) {
305+
while (blockBits.length() <128) {
309306
blockBits ='0' +blockBits;
310307
}
311308

@@ -333,8 +330,7 @@ public static BigInteger mergeCellsIntoBlock(int[] cells) {
333330
StringcellBits =Integer.toBinaryString(cells[i]);
334331

335332
// Append leading 0 for full "8-bit" strings
336-
intcellBitsLength =cellBits.length();
337-
while (cellBitsLength <8) {
333+
while (cellBits.length() <8) {
338334
cellBits ='0' +cellBits;
339335
}
340336

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp