I want to convert the Base62 Byte array to a user-friendly, stylish
In this code
I need to convert "[B @ 913fe2" (result) to "Hello Wold!".
I looked through several previous questions, but I do not know how to do this.
package chapter9; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.*; import java.util.Arrays; import org.apache.commons.codec.binary.Base64; import org.bouncycastle.cms.CMSProcessable; import org.bouncycastle.cms.CMSProcessableByteArray; import org.bouncycastle.cms.CMSSignedData; import org.bouncycastle.cms.CMSSignedDataGenerator; public class SignedDataExample extends SignedDataProcessor { public static void main(String[] args) throws Exception { KeyStore credentials = Utils.createCredentials(); PrivateKey key = (PrivateKey)credentials.getKey(Utils.END_ENTITY_ALIAS, Utils.KEY_PASSWD); Certificate[] chain = credentials.getCertificateChain(Utils.END_ENTITY_ALIAS); CertStore certsAndCRLs = CertStore.getInstance("Collection", new CollectionCertStoreParameters(Arrays.asList(chain)), "BC"); X509Certificate cert = (X509Certificate)chain[0];
}
again, the result shows
verification completed
[B @ 913fe2
I need to convert "[B @ 913fe2" (result) to "Hello Wold!".
Sincerely.
source share