Skip to content

Commit c405b7f

Browse files
Fix errors
1 parent a11997b commit c405b7f

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

src/main/java/com/ibm/crypto/plus/provider/ock/NativeOCKAdapter.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,11 @@ public void do_CCM_delete() throws OCKException {
665665
}
666666

667667
@Override
668-
public int RSACIPHER_public_encrypt(long rsaKeyId, int rsaPaddingId, byte[] plaintext, int plaintextOffset,
668+
public int RSACIPHER_public_encrypt(long rsaKeyId,
669+
int rsaPaddingId, int mdId, int mgf1Id, byte[] plaintext, int plaintextOffset,
669670
int plaintextLen, byte[] ciphertext, int ciphertextOffset) throws OCKException {
670671
return NativeOCKImplementation.RSACIPHER_public_encrypt(ockContext.getId(), rsaKeyId, rsaPaddingId,
671-
plaintext, plaintextOffset, plaintextLen, ciphertext, ciphertextOffset);
672+
mdId, mgf1Id, plaintext, plaintextOffset, plaintextLen, ciphertext, ciphertextOffset);
672673
}
673674

674675
@Override
@@ -686,10 +687,12 @@ public int RSACIPHER_public_decrypt(long rsaKeyId, int rsaPaddingId, byte[] ciph
686687
}
687688

688689
@Override
689-
public int RSACIPHER_private_decrypt(long rsaKeyId, int rsaPaddingId, byte[] ciphertext, int ciphertextOffset,
690-
int ciphertextLen, byte[] plaintext, int plaintextOffset, boolean convertKey) throws OCKException {
690+
public int RSACIPHER_private_decrypt(long rsaKeyId,
691+
int rsaPaddingId, int mdId, int mgf1Id, byte[] ciphertext, int ciphertextOffset,
692+
int ciphertextLen, byte[] plaintext, int plaintextOffset, boolean convertKey)
693+
throws OCKException {
691694
return NativeOCKImplementation.RSACIPHER_private_decrypt(ockContext.getId(), rsaKeyId, rsaPaddingId,
692-
ciphertext, ciphertextOffset, ciphertextLen, plaintext, plaintextOffset, convertKey);
695+
mdId, mgf1Id, ciphertext, ciphertextOffset, ciphertextLen, plaintext, plaintextOffset, convertKey);
693696
}
694697

695698
@Override
@@ -772,11 +775,6 @@ public byte[] RSAKEY_getPublicKeyBytes(long rsaKeyId) throws OCKException {
772775
return NativeOCKImplementation.RSAKEY_getPublicKeyBytes(ockContext.getId(), rsaKeyId);
773776
}
774777

775-
@Override
776-
public long RSAKEY_createPKey(long rsaKeyId) throws OCKException {
777-
return NativeOCKImplementation.RSAKEY_createPKey(ockContext.getId(), rsaKeyId);
778-
}
779-
780778
@Override
781779
public int RSAKEY_size(long rsaKeyId) {
782780
return NativeOCKImplementation.RSAKEY_size(ockContext.getId(), rsaKeyId);

src/main/java/com/ibm/crypto/plus/provider/ock/NativeOCKImplementation.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ static public native int do_CCM_decrypt(long ockContextId, byte[] iv, int ivLen,
439439
// =========================================================================
440440

441441
static public native int RSACIPHER_public_encrypt(long ockContextId, long rsaKeyId,
442-
int rsaPaddingId, byte[] plaintext, int plaintextOffset, int plaintextLen,
442+
int rsaPaddingId, int mdId, int mgf1Id, byte[] plaintext, int plaintextOffset, int plaintextLen,
443443
byte[] ciphertext, int ciphertextOffset) throws OCKException;
444444

445445
static public native int RSACIPHER_private_encrypt(long ockContextId, long rsaKeyId,
@@ -451,7 +451,7 @@ static public native int RSACIPHER_public_decrypt(long ockContextId, long rsaKey
451451
byte[] plaintext, int plaintextOffset) throws OCKException;
452452

453453
static public native int RSACIPHER_private_decrypt(long ockContextId, long rsaKeyId,
454-
int rsaPaddingId, byte[] ciphertext, int ciphertextOffset, int ciphertextLen,
454+
int rsaPaddingId, int mdId, int mgf1Id, byte[] ciphertext, int ciphertextOffset, int ciphertextLen,
455455
byte[] plaintext, int plaintextOffset, boolean convertKey) throws OCKException;
456456

457457
// =========================================================================
@@ -505,9 +505,6 @@ static public native byte[] RSAKEY_getPrivateKeyBytes(long ockContextId, long rs
505505
static public native byte[] RSAKEY_getPublicKeyBytes(long ockContextId, long rsaKeyId)
506506
throws OCKException;
507507

508-
static public native long RSAKEY_createPKey(long ockContextId, long rsaKeyId)
509-
throws OCKException;
510-
511508
static public native int RSAKEY_size(long ockContextId, long rsaKeyId);
512509

513510
static public native void RSAKEY_delete(long ockContextId, long rsaKeyId);

0 commit comments

Comments
 (0)