Fix useless/misplaced short conversions
This commit is contained in:
@@ -320,7 +320,7 @@ public final class PGPKey {
|
||||
off = Common.skipLength(buf, off, (short)(len - (short)(off - boff)));
|
||||
template_off = off;
|
||||
|
||||
if(template_len > (short)(len - ((short)off - boff))) {
|
||||
if(template_len > (short)(len - (short)(off - boff))) {
|
||||
ISOException.throwIt(ISO7816.SW_WRONG_DATA);
|
||||
return;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ public final class PGPKey {
|
||||
off = Common.skipLength(buf, off, (short)(len - (short)(off - boff)));
|
||||
data_off = off;
|
||||
|
||||
if(data_len > (short)(len - ((short)off - boff))) {
|
||||
if(data_len > (short)(len - (short)(off - boff))) {
|
||||
ISOException.throwIt(ISO7816.SW_WRONG_DATA);
|
||||
return;
|
||||
}
|
||||
@@ -476,9 +476,9 @@ public final class PGPKey {
|
||||
cipher_rsa_pkcs1.init(priv, Cipher.MODE_ENCRYPT);
|
||||
|
||||
off = cipher_rsa_pkcs1.doFinal(buf, (short)0, lc,
|
||||
buf, (short)lc);
|
||||
buf, lc);
|
||||
|
||||
return Util.arrayCopyNonAtomic(buf, (short)lc,
|
||||
return Util.arrayCopyNonAtomic(buf, lc,
|
||||
buf, (short)0,
|
||||
off);
|
||||
|
||||
@@ -516,7 +516,7 @@ public final class PGPKey {
|
||||
cipher_rsa_pkcs1.init(priv, Cipher.MODE_DECRYPT);
|
||||
|
||||
final short len = cipher_rsa_pkcs1.doFinal(buf, (short)1, (short)(lc - 1),
|
||||
buf, (short)lc);
|
||||
buf, lc);
|
||||
|
||||
off = Util.arrayCopyNonAtomic(buf, lc,
|
||||
buf, (short)0,
|
||||
|
Reference in New Issue
Block a user