java加密的字符串不会从Volley Response返回精确值

The structure of my app is:

  1. in java get the data as a string (Successful)
  2. Encrypt it with my encryption class. (Successful)
  3. Store the Encrypted data to database server using Volley for future use. (Successful)
  4. Get the Encrypted data from my database (Successful)
  5. Retrieve data using Volley Response, in java, the value of the response has an additional " " and "" in it.

           Encrypted Message: gDELc873OU8RxIt9P80xVw==
           Response Volley: "gDELc873OU8RxIt9P80xVw==
    "
    
  6. What i need is to get the exact encrypted value so that i can decrypt in java.

Any workaround might help? Thanks in advance.

I finally found the answer:

encryptedVolley = "gDELc873OU8RxIt9P80xVw== "

encryptedVolley.substring(1,str.length()-3);