Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/tinyradius/packet/AccessRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ private byte[] encodePapPassword(final byte[] userPass, byte[] sharedSecret) {
md5.update(i == 0 ? getAuthenticator() : lastBlock);
byte bn[] = md5.digest();

System.arraycopy(encryptedPass, i, lastBlock, 0, 16);

// perform the XOR as specified by RFC 2865.
for (int j = 0; j < 16; j++)
encryptedPass[i + j] = (byte) (bn[j] ^ encryptedPass[i + j]);

System.arraycopy(encryptedPass, i, lastBlock, 0, 16);
}

return encryptedPass;
Expand Down