SecurityToken: rename methods, fix comments

This commit is contained in:
Nikita Mikhailov 2016-05-15 23:22:49 +06:00
parent 6855417b5b
commit 3d827d5a6b
2 changed files with 4 additions and 11 deletions

View file

@ -51,7 +51,7 @@ public enum KeyType {
return mIdx;
}
public int getmSlot() {
public int getSlot() {
return mSlot;
}
@ -59,7 +59,7 @@ public enum KeyType {
return mTimestampObjectId;
}
public int getmFingerprintObjectId() {
public int getFingerprintObjectId() {
return mFingerprintObjectId;
}
}

View file

@ -43,8 +43,6 @@ import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.security.interfaces.RSAPrivateCrtKey;
import nordpol.Apdu;
/**
* This class provides a communication interface to OpenPGP applications on ISO SmartCard compliant
* devices.
@ -82,10 +80,6 @@ public class SecurityTokenHelper {
return LazyHolder.SECURITY_TOKEN_HELPER;
}
private static String getHex(byte[] raw) {
return new String(Hex.encode(raw));
}
private String getHolderName(byte[] name) {
try {
return (new String(name, 4, name[3])).replace('<', ' ');
@ -133,8 +127,8 @@ public class SecurityTokenHelper {
keyType.toString()));
}
putKey(keyType.getmSlot(), secretKey, passphrase);
putData(keyType.getmFingerprintObjectId(), secretKey.getFingerprint());
putKey(keyType.getSlot(), secretKey, passphrase);
putData(keyType.getFingerprintObjectId(), secretKey.getFingerprint());
putData(keyType.getTimestampObjectId(), timestampBytes);
}
@ -474,7 +468,6 @@ public class SecurityTokenHelper {
verifyPin(0x81); // (Verify PW1 with mode 81 for signing)
}
// dsi, including Lc
byte[] dsi;
Log.i(Constants.TAG, "Hash: " + hashAlgo);