fix incorrect length in copyOfRange
This commit is contained in:
@@ -112,7 +112,7 @@ public class PsoDecryptTokenOp {
|
||||
private byte[] decryptSessionKeyEcdh(byte[] encryptedSessionKeyMpi, ECKeyFormat eckf, CanonicalizedPublicKey publicKey)
|
||||
throws IOException {
|
||||
int mpiLength = getMpiLength(encryptedSessionKeyMpi);
|
||||
byte[] encryptedPoint = Arrays.copyOfRange(encryptedSessionKeyMpi, 2, mpiLength);
|
||||
byte[] encryptedPoint = Arrays.copyOfRange(encryptedSessionKeyMpi, 2, mpiLength + 2);
|
||||
|
||||
X9ECParameters x9Params = NISTNamedCurves.getByOID(eckf.getCurveOID());
|
||||
ECPoint p = x9Params.getCurve().decodePoint(encryptedPoint);
|
||||
|
||||
Reference in New Issue
Block a user