Skip to content

Commit

Permalink
fix code formatting through the repo
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed May 5, 2023
1 parent 633ec4f commit 216c5f8
Show file tree
Hide file tree
Showing 415 changed files with 44,162 additions and 42,914 deletions.
24 changes: 14 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,20 +25,23 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Mail server:**
- Protocol being used: [e.g. smtp, imap, pop3, etc.]
- Vendor/product: [e.g. Microsoft Exchange]
- Mail service URL: [e.g. gmail.com]

- Protocol being used: [e.g. smtp, imap, pop3, etc.]
- Vendor/product: [e.g. Microsoft Exchange]
- Mail service URL: [e.g. gmail.com]

**Additional context**
Add any other context about the problem here.
22 changes: 11 additions & 11 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ on:

jobs:
build:
name: Test on JDK ${{ matrix.java_version }}
name: Test on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest

strategy:
matrix:
java_version: [ 8, 11, 17 ]

steps:
- name: Checkout for build
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
cache: maven
- name: Verify
run: mvn -B -U -C -V clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Poss-release,staging,build-only -Dgpg.skip=true -Dcopyright.ignoreyear=true -Denforcer.skip
- name: Checkout for build
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
cache: maven
- name: Verify
run: mvn -B -U -C -V clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Poss-release,staging,build-only -Dgpg.skip=true -Dcopyright.ignoreyear=true -Denforcer.skip
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Update web site
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
branches: [ "master" ]
paths:
- 'doc/**'
- 'www/**'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ www/docs
www/CONTRIBUTING.md
www/README.md
www/TCK-Results.md
*.iml
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@

---

## The GNU General Public License (GPL) Version 2, June 1991
## The GNU General Public License (GPL) Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor
Expand Down
158 changes: 79 additions & 79 deletions core/src/main/java/org/eclipse/angus/mail/auth/MD4.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
* buffer of bytes. It is an implementation of the RSA Data Security Inc
* MD4 algorithim as described in internet RFC 1320.
*
* @author Andreas Sterbenz
* @author Bill Shannon (adapted for Jakarta Mail)
* @author Andreas Sterbenz
* @author Bill Shannon (adapted for Jakarta Mail)
*/
public final class MD4 {

Expand Down Expand Up @@ -69,7 +69,7 @@ public final class MD4 {

static {
padding = new byte[136];
padding[0] = (byte)0x80;
padding[0] = (byte) 0x80;
}

/**
Expand All @@ -84,15 +84,15 @@ public MD4() {
/**
* Compute and return the message digest of the input byte array.
*
* @param in the input byte array
* @return the message digest byte array
* @param in the input byte array
* @return the message digest byte array
*/
public byte[] digest(byte[] in) {
implReset();
engineUpdate(in, 0, in.length);
byte[] out = new byte[16];
implDigest(out, 0);
return out;
implReset();
engineUpdate(in, 0, in.length);
byte[] out = new byte[16];
implDigest(out, 0);
return out;
}

/**
Expand All @@ -116,30 +116,30 @@ private void implReset() {
private void implDigest(byte[] out, int ofs) {
long bitsProcessed = bytesProcessed << 3;

int index = (int)bytesProcessed & 0x3f;
int index = (int) bytesProcessed & 0x3f;
int padLen = (index < 56) ? (56 - index) : (120 - index);
engineUpdate(padding, 0, padLen);

//i2bLittle4((int)bitsProcessed, buffer, 56);
//i2bLittle4((int)(bitsProcessed >>> 32), buffer, 60);
buffer[56] = (byte)bitsProcessed;
buffer[57] = (byte)(bitsProcessed>>8);
buffer[58] = (byte)(bitsProcessed>>16);
buffer[59] = (byte)(bitsProcessed>>24);
buffer[60] = (byte)(bitsProcessed>>32);
buffer[61] = (byte)(bitsProcessed>>40);
buffer[62] = (byte)(bitsProcessed>>48);
buffer[63] = (byte)(bitsProcessed>>56);
buffer[56] = (byte) bitsProcessed;
buffer[57] = (byte) (bitsProcessed >> 8);
buffer[58] = (byte) (bitsProcessed >> 16);
buffer[59] = (byte) (bitsProcessed >> 24);
buffer[60] = (byte) (bitsProcessed >> 32);
buffer[61] = (byte) (bitsProcessed >> 40);
buffer[62] = (byte) (bitsProcessed >> 48);
buffer[63] = (byte) (bitsProcessed >> 56);
implCompress(buffer, 0);

//i2bLittle(state, 0, out, ofs, 16);
for (int i = 0; i < state.length; i++) {
int x = state[i];
out[ofs++] = (byte)x;
out[ofs++] = (byte)(x>>8);
out[ofs++] = (byte)(x>>16);
out[ofs++] = (byte)(x>>24);
}
for (int i = 0; i < state.length; i++) {
int x = state[i];
out[ofs++] = (byte) x;
out[ofs++] = (byte) (x >> 8);
out[ofs++] = (byte) (x >> 16);
out[ofs++] = (byte) (x >> 24);
}
}

private void engineUpdate(byte[] b, int ofs, int len) {
Expand Down Expand Up @@ -201,70 +201,70 @@ private static int HH(int a, int b, int c, int d, int x, int s) {
*/
private void implCompress(byte[] buf, int ofs) {
//b2iLittle64(buf, ofs, x);
for (int xfs = 0; xfs < x.length; xfs++) {
x[xfs] = (buf[ofs] & 0xff) | ((buf[ofs+1] & 0xff) << 8) |
((buf[ofs+2] & 0xff) << 16) | ((buf[ofs+3] & 0xff) << 24);
ofs += 4;
}
for (int xfs = 0; xfs < x.length; xfs++) {
x[xfs] = (buf[ofs] & 0xff) | ((buf[ofs + 1] & 0xff) << 8) |
((buf[ofs + 2] & 0xff) << 16) | ((buf[ofs + 3] & 0xff) << 24);
ofs += 4;
}

int a = state[0];
int b = state[1];
int c = state[2];
int d = state[3];

/* Round 1 */
a = FF (a, b, c, d, x[ 0], S11); /* 1 */
d = FF (d, a, b, c, x[ 1], S12); /* 2 */
c = FF (c, d, a, b, x[ 2], S13); /* 3 */
b = FF (b, c, d, a, x[ 3], S14); /* 4 */
a = FF (a, b, c, d, x[ 4], S11); /* 5 */
d = FF (d, a, b, c, x[ 5], S12); /* 6 */
c = FF (c, d, a, b, x[ 6], S13); /* 7 */
b = FF (b, c, d, a, x[ 7], S14); /* 8 */
a = FF (a, b, c, d, x[ 8], S11); /* 9 */
d = FF (d, a, b, c, x[ 9], S12); /* 10 */
c = FF (c, d, a, b, x[10], S13); /* 11 */
b = FF (b, c, d, a, x[11], S14); /* 12 */
a = FF (a, b, c, d, x[12], S11); /* 13 */
d = FF (d, a, b, c, x[13], S12); /* 14 */
c = FF (c, d, a, b, x[14], S13); /* 15 */
b = FF (b, c, d, a, x[15], S14); /* 16 */
a = FF(a, b, c, d, x[0], S11); /* 1 */
d = FF(d, a, b, c, x[1], S12); /* 2 */
c = FF(c, d, a, b, x[2], S13); /* 3 */
b = FF(b, c, d, a, x[3], S14); /* 4 */
a = FF(a, b, c, d, x[4], S11); /* 5 */
d = FF(d, a, b, c, x[5], S12); /* 6 */
c = FF(c, d, a, b, x[6], S13); /* 7 */
b = FF(b, c, d, a, x[7], S14); /* 8 */
a = FF(a, b, c, d, x[8], S11); /* 9 */
d = FF(d, a, b, c, x[9], S12); /* 10 */
c = FF(c, d, a, b, x[10], S13); /* 11 */
b = FF(b, c, d, a, x[11], S14); /* 12 */
a = FF(a, b, c, d, x[12], S11); /* 13 */
d = FF(d, a, b, c, x[13], S12); /* 14 */
c = FF(c, d, a, b, x[14], S13); /* 15 */
b = FF(b, c, d, a, x[15], S14); /* 16 */

/* Round 2 */
a = GG (a, b, c, d, x[ 0], S21); /* 17 */
d = GG (d, a, b, c, x[ 4], S22); /* 18 */
c = GG (c, d, a, b, x[ 8], S23); /* 19 */
b = GG (b, c, d, a, x[12], S24); /* 20 */
a = GG (a, b, c, d, x[ 1], S21); /* 21 */
d = GG (d, a, b, c, x[ 5], S22); /* 22 */
c = GG (c, d, a, b, x[ 9], S23); /* 23 */
b = GG (b, c, d, a, x[13], S24); /* 24 */
a = GG (a, b, c, d, x[ 2], S21); /* 25 */
d = GG (d, a, b, c, x[ 6], S22); /* 26 */
c = GG (c, d, a, b, x[10], S23); /* 27 */
b = GG (b, c, d, a, x[14], S24); /* 28 */
a = GG (a, b, c, d, x[ 3], S21); /* 29 */
d = GG (d, a, b, c, x[ 7], S22); /* 30 */
c = GG (c, d, a, b, x[11], S23); /* 31 */
b = GG (b, c, d, a, x[15], S24); /* 32 */
a = GG(a, b, c, d, x[0], S21); /* 17 */
d = GG(d, a, b, c, x[4], S22); /* 18 */
c = GG(c, d, a, b, x[8], S23); /* 19 */
b = GG(b, c, d, a, x[12], S24); /* 20 */
a = GG(a, b, c, d, x[1], S21); /* 21 */
d = GG(d, a, b, c, x[5], S22); /* 22 */
c = GG(c, d, a, b, x[9], S23); /* 23 */
b = GG(b, c, d, a, x[13], S24); /* 24 */
a = GG(a, b, c, d, x[2], S21); /* 25 */
d = GG(d, a, b, c, x[6], S22); /* 26 */
c = GG(c, d, a, b, x[10], S23); /* 27 */
b = GG(b, c, d, a, x[14], S24); /* 28 */
a = GG(a, b, c, d, x[3], S21); /* 29 */
d = GG(d, a, b, c, x[7], S22); /* 30 */
c = GG(c, d, a, b, x[11], S23); /* 31 */
b = GG(b, c, d, a, x[15], S24); /* 32 */

/* Round 3 */
a = HH (a, b, c, d, x[ 0], S31); /* 33 */
d = HH (d, a, b, c, x[ 8], S32); /* 34 */
c = HH (c, d, a, b, x[ 4], S33); /* 35 */
b = HH (b, c, d, a, x[12], S34); /* 36 */
a = HH (a, b, c, d, x[ 2], S31); /* 37 */
d = HH (d, a, b, c, x[10], S32); /* 38 */
c = HH (c, d, a, b, x[ 6], S33); /* 39 */
b = HH (b, c, d, a, x[14], S34); /* 40 */
a = HH (a, b, c, d, x[ 1], S31); /* 41 */
d = HH (d, a, b, c, x[ 9], S32); /* 42 */
c = HH (c, d, a, b, x[ 5], S33); /* 43 */
b = HH (b, c, d, a, x[13], S34); /* 44 */
a = HH (a, b, c, d, x[ 3], S31); /* 45 */
d = HH (d, a, b, c, x[11], S32); /* 46 */
c = HH (c, d, a, b, x[ 7], S33); /* 47 */
b = HH (b, c, d, a, x[15], S34); /* 48 */
a = HH(a, b, c, d, x[0], S31); /* 33 */
d = HH(d, a, b, c, x[8], S32); /* 34 */
c = HH(c, d, a, b, x[4], S33); /* 35 */
b = HH(b, c, d, a, x[12], S34); /* 36 */
a = HH(a, b, c, d, x[2], S31); /* 37 */
d = HH(d, a, b, c, x[10], S32); /* 38 */
c = HH(c, d, a, b, x[6], S33); /* 39 */
b = HH(b, c, d, a, x[14], S34); /* 40 */
a = HH(a, b, c, d, x[1], S31); /* 41 */
d = HH(d, a, b, c, x[9], S32); /* 42 */
c = HH(c, d, a, b, x[5], S33); /* 43 */
b = HH(b, c, d, a, x[13], S34); /* 44 */
a = HH(a, b, c, d, x[3], S31); /* 45 */
d = HH(d, a, b, c, x[11], S32); /* 46 */
c = HH(c, d, a, b, x[7], S33); /* 47 */
b = HH(b, c, d, a, x[15], S34); /* 48 */

state[0] += a;
state[1] += b;
Expand Down
Loading

0 comments on commit 216c5f8

Please sign in to comment.