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; return mIdx;
} }
public int getmSlot() { public int getSlot() {
return mSlot; return mSlot;
} }
@ -59,7 +59,7 @@ public enum KeyType {
return mTimestampObjectId; return mTimestampObjectId;
} }
public int getmFingerprintObjectId() { public int getFingerprintObjectId() {
return mFingerprintObjectId; return mFingerprintObjectId;
} }
} }

View file

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