I am using the method encryptDecrypt at line number 235 to decrypt the challenge string sent by ONDC.
It gives pad block corrupted error, so I changed the line 249 to
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding", BouncyCastleProvider.PROVIDER_NAME);
It removes the padding error.
Decrypted challenge string by given code is not matching with expected decrypted string.
https://github.com/ONDC-Official/reference-implementations/blob/fe5ed71ead469271bd1504e9e708cdc28885cf0b/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoFunctions.java#L235C2-L255C1
I am using the method encryptDecrypt at line number 235 to decrypt the challenge string sent by ONDC. It gives pad block corrupted error, so I changed the line 249 to Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding", BouncyCastleProvider.PROVIDER_NAME);
It removes the padding error. Decrypted challenge string by given code is not matching with expected decrypted string.