MCPcopy Create free account
hub / github.com/SEBV1/idlefish_monitor / decode

Method decode

src/main/java/com/github/utils/Base64.java:68–165  ·  view source on GitHub ↗
(String str)

Source from the content-addressed store, hash-verified

66 }
67
68 public static byte[] decode(String str) {
69 if (str == null) {
70 return null;
71 }
72 char[] charArray = str.toCharArray();
73 int removeWhiteSpace = removeWhiteSpace(charArray);
74 if (removeWhiteSpace % 4 != 0) {
75 return null;
76 }
77 int i = removeWhiteSpace / 4;
78 if (i == 0) {
79 return new byte[0];
80 }
81 byte[] bArr = new byte[i * 3];
82 int i2 = 0;
83 int i3 = 0;
84 int i4 = 0;
85 while (i2 < i - 1) {
86 int i5 = i3 + 1;
87 char c = charArray[i3];
88 if (isData(c)) {
89 int i6 = i5 + 1;
90 char c2 = charArray[i5];
91 if (isData(c2)) {
92 int i7 = i6 + 1;
93 char c3 = charArray[i6];
94 if (isData(c3)) {
95 int i8 = i7 + 1;
96 char c4 = charArray[i7];
97 if (isData(c4)) {
98 byte[] bArr2 = base64Alphabet;
99 byte b = bArr2[c];
100 byte b2 = bArr2[c2];
101 byte b3 = bArr2[c3];
102 byte b4 = bArr2[c4];
103 int i9 = i4 + 1;
104 bArr[i4] = (byte) ((b << 2) | (b2 >> 4));
105 int i10 = i9 + 1;
106 bArr[i9] = (byte) (((b2 & 15) << 4) | ((b3 >> 2) & 15));
107 i4 = i10 + 1;
108 bArr[i10] = (byte) ((b3 << 6) | b4);
109 i2++;
110 i3 = i8;
111 }
112 }
113 }
114 }
115 return null;
116 }
117 int i11 = i3 + 1;
118 char c5 = charArray[i3];
119 if (!isData(c5)) {
120 return null;
121 }
122 int i12 = i11 + 1;
123 char c6 = charArray[i11];
124 if (!isData(c6)) {
125 return null;

Callers 9

signMethod · 0.95
ogFunction · 0.80
register$3Function · 0.80
removeWebKitStylesFunction · 0.80
reFunction · 0.80
DpFunction · 0.80
register$1Function · 0.80
removeWebKitStylesFunction · 0.80
neFunction · 0.80

Calls 3

removeWhiteSpaceMethod · 0.95
isDataMethod · 0.95
isPadMethod · 0.95

Tested by

no test coverage detected