| Code with Finding: |
class BACPanel.MutualAuthPanel {
public MutualAuthPanel() {
super(new BorderLayout());
setBorder(BorderFactory.createTitledBorder(PANEL_BORDER,
"Mutual Authenticate"));
JPanel top = new JPanel(new FlowLayout());
challengeField = new HexField(8);
challengeField.setValue(Hex.hexStringToBytes("781723860C06C226"));
keyField = new HexField(16);
keyField.setValue(Hex
.hexStringToBytes("0B795240CB7049B01C19B33E32804F0B"));
JButton authButton = new JButton("Mutual Authenticate");
authButton.addActionListener(this);
top.add(new JLabel("RND.IFD: "));
top.add(challengeField);
top.add(new JLabel("K.IFD: "));
top.add(keyField);
top.add(authButton);
JPanel center = new JPanel(new FlowLayout());
plaintextField = new HexField(32);
plaintextField.setEditable(false);
center.add(new JLabel("[E.ICC]: "));
center.add(plaintextField);
JPanel bottom = new JPanel(new GridLayout(3, 2));
ksEncTF = new HexField(24);
ksEncTF.setEditable(false);
ksMacTF = new HexField(24);
ksMacTF.setEditable(false);
sscTF = new HexField(8);
sscTF.setEditable(false);
bottom.add(new JLabel("KS.ENC: ", JLabel.RIGHT));
bottom.add(ksEncTF);
bottom.add(new JLabel("KS.MAC: ", JLabel.RIGHT));
bottom.add(ksMacTF);
bottom.add(new JLabel("SSC: ", JLabel.RIGHT));
bottom.add(sscTF);
add(top, BorderLayout.NORTH);
add(center, BorderLayout.CENTER);
add(bottom, BorderLayout.SOUTH);
}
}
|