File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
kms/src/test/java/com/example Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 3131import java .io .ByteArrayOutputStream ;
3232import java .io .IOException ;
3333import java .io .PrintStream ;
34+ import java .nio .charset .StandardCharsets ;
3435import java .security .NoSuchAlgorithmException ;
3536import java .security .NoSuchProviderException ;
3637import java .security .PublicKey ;
3738import java .security .spec .InvalidKeySpecException ;
39+ import java .util .Base64 ;
3840import java .util .UUID ;
3941import java .util .regex .Matcher ;
4042import java .util .regex .Pattern ;
@@ -142,7 +144,7 @@ public void testRSAEncryptDecrypt() throws Exception {
142144 assertEquals ("incorrect RSA ciphertext length." , 344 , ciphertext .length ());
143145 assertEquals ("incorrect ciphertext final character." , '=' , ciphertext .charAt (343 ));
144146
145- bytes [] plainbytes = Asymmetric .decryptRSA (cipherbytes , client , rsaDecrypt );
147+ byte [] plainbytes = Asymmetric .decryptRSA (cipherbytes , client , rsaDecrypt );
146148 String plaintext = new String (plainbytes );
147149 assertEquals ("decryption failed." , message , plaintext );
148150 }
You can’t perform that action at this time.
0 commit comments