Methods Summary |
---|
public static APDUPermissions | getAPDUPermissions(int slot, byte[] selectAPDU, java.lang.String root)Returns object that should be used for access control verification.
if (ACLInfo == null || ACLInfo[slot] == null) {
APDUPermissions perm;
perm = new APDUPermissions(null);
perm.setType(ACLPermissions.ALLOW);
return perm;
}
return (APDUPermissions) ACLInfo[slot].getACLPermissions(true,
selectAPDU, root);
|
public static byte[] | getHash(byte[] inBuf, int inOff, int inLen)Calculates hash value.
synchronized (shaSync) {
try {
if (sha == null) {
sha = MessageDigest.getInstance("SHA-1");
}
sha.reset();
byte[] hash = new byte[20];
sha.update(inBuf, inOff, inLen);
sha.digest(hash, 0, hash.length);
return hash;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
|
public static JCRMIPermissions | getJCRMIPermissions(int slot, byte[] selectAPDU, java.lang.String root)Returns object that should be used for access control verification.
if (ACLInfo == null || ACLInfo[slot] == null) {
JCRMIPermissions perm = new JCRMIPermissions(null);
perm.setType(ACLPermissions.ALLOW);
return perm;
}
return (JCRMIPermissions) ACLInfo[slot].getACLPermissions(false,
selectAPDU, root);
|
private static synchronized void | init()Initialise ACL information.
if (ACLInfo != null) {
return;
}
int maxSlot = APDUManager.getSlotCount();
ACLInfo = new ACSlot[maxSlot];
|
public static synchronized void | init(int slot)Initialize ACL information.
if (ACLInfo == null) {
init();
}
if (ACLInfo != null) {
ACLInfo[slot] = ACSlot.load(slot);
}
|