I am working on an Android client for a fearless service. To summarize, I must send a request that looks like this:
& lt ;? Xml version = \ "1.0 \" encoding = \ "UTF-8 \" standalone = \ "yes \"? & Gt; & Lt; RSakeyValue xmlns = \ "http: //www.w3.org/2000/09/xmldsig# \" & gt; & Lt; Modulus & gt; Akbianpft2ugla9Dht9GENdd5HtSdaEngCkbPYlz2syeulOpYJrS9UhRxvfWIlSPB3GltJEGS5mibQtLcDS9zlnwsg8IoJ8Pq9Dd8XWmBa6oUYeotjA90YhC5F06085yew8nqPTOikdhpmBJT7AAmp9elnkSoVASD0WQnnlKqkCR & lt; / Modulus & gt; & Lt; Exponential & gt; AQAB & lt; / Exponent & gt; & Lt; / RSakeyValue & gt;
Both modules and exponents are byte
s, but when they go through a marshaler, they look up if I outputstream
If I pass through a simple byte
, then my request looks like this:
& lt ;? Xml version = "1.0" encoding = "UTF-8" standalone = "yes"? & Gt; & Lt; RSakeyValue xmlns = "http://www.w3.org/2000/09/xmldsig#" & gt; & Lt; Modulus & gt; [@ B2f43ee0 & lt; b; / Modulus & gt; & Lt; Exponential & gt; [@ B2f43f90 & lt; b; / Exponent & gt; & Lt; / RSakeyValue & gt;
If the server can not process then my question is, how to get those strings?
Resolve it!
Import android.util.Base64; Base64.encode (& lt; data & gt; base64.DEFAULT)
Comments
Post a Comment