Problem of DER bytes
Posted: Thu Nov 03, 2016 1:12 am
				
				I am implementing Fips 196 and  I am caught in a problem recently. I encode the user certificate into encoded byte array and wrap the DER byte array into string object and when I tried to get these DER encoded bytes back again. I got the different bytes. Why this happened? Any help here?
			Code: Select all
                         certData = response.getData();     
                         for(int i=0; i<certData.length; i++)
                         {
                              System.out.print(certData);
                         }
               String d = new String (certData);
               byte[] testarr = d.getBytes();
                    for(int i=0; i<testarr.length; i++)
                    {
                         System.out.print(d.getBytes()[i]);
                    }