cancel
Showing results for 
Search instead for 
Did you mean: 

Get KeyStore Array of Bytes

former_member193964
Active Participant
0 Kudos

Hi all,

How I get the array of Bytes in the keyStore using JavaMapping for PI 7.1??

I need to pass this value to a TAG in my java mapping.

Regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member193964
Active Participant
0 Kudos

I need to pass the keyStore content into the tag. See the example below:

<ns0:certificate

xsi:Type = "xsd:base64Binary">MIICbzCCAVegAwIBAgICAPQwDiuIUHhiuhYtexmnB

Kiuyi76rytghfcHGHGVhgvuyjkhbjkhkjhiu7jVJgh8iuiuJ

ljk98y98jhbOIUUtyf76gfclçojopIjoIJOIutfyrtfYTFYTFU

UHYGRDWcvgbnjiu5gplmibvhhcvdwqx5gBft69oijYf

</ns0:certiicate>

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You might want to use base64 encoding if you want to encode the data and similarly other end has to decode the data using java. Or if you dont need encoding read the keystore data in byte array and convert it into string before assignt to tag element.

For encoding the link might be helpful

http://java.codefetch.com/example/qg/src/com/oreilly/servlet/Base64Encoder.java?qy=string

former_member193964
Active Participant
0 Kudos

Baskar Thanks for your attention.

Do you have the code to get a KeyStore(Byte) in the PI??

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Your exact requirement is not clear. But the below link will help for declaring or creating bytes of array data to store or retrieve keystore.

http://oreilly.com/catalog/javacrypt/chapter/ch06.html