0

我是安卓新手。我正在尝试将编码的文本解码为字符串。

编码文本是

p1SvSCiAxupKrrZXzjXQk2vgZXVRDDNbTQ2buO6SXo2U02/F8MtEl8P4Mf6/lPNba5++iad3c/JX y7JKchV4pUoHyxASpeZbM9IWf9DnAqTRKqQxK6kZn/QszC5oLcl4PdkPE+vVgjqeut+BFDZntJot Nj0LSgdh1e007E+0opQH7Ia7uaeGNlRKnkMhhjLDZAWTGX/krAe+TFAQQ24ixxk9vH3blEPVyyG2 eWdO9M5KB8sQEqXmW6JSk6PlNBdBSgfLEBKl5lvB9aWDyEX3PhKnRJA43kp46H1iQchaSi8QxQOF pIMUGFJMzDC8WQciaQE6Q+tvChijOxwJbgqAZRM9WaF7T9Uu5xFK5iKdBbazzKTNzGY5PcyZ7dh8 F8DpA+q/GwUDVddWckp3ucdNncgE4yrU/EThueP9PA5gCX1jnOUA6XWhT0oHyxASpeZbrfDAqK5P qSk2ED6A40WuVmquOu9DM5Shx/iKGMSMI8KdHztAGHNcJTGjvjxt8FONFLFQWXOzE4DWyT4XhPt+ Y1odNb7WbOJ0BjKZSfRUOXFmSxRXE1z7zCEt0E5DTcKXvpKOdFdEdsF6tJS4JyYhaCbVI6juzknj qpTuMFw/5Zy6c3gx6ExhOuO0uY3pAEtnf52JVCFvRHHQG/JqbBe2UO45OPh0BfKJQMIRDLYUBm8x RbixYCQNZb/ERjXT0+AxtHVXuuHQeDlqZqHeNUg+6U5FDim1D12v95izotnYleU9sOORaY6ULjV7 ZOf6ctOmVEv4pJsCtVPT4/21lHXZwVjFPjl5A9Bjawc5XdJMo7h0lGx+4CznO5QdHK0ZtJKIy/OP I8lUpzRH0EpFI2hRiZFAW+TxP7YdB34+jy45MJQNLKDcOx8d8oC7CfJkfN/xD1BYXAZjebDYu1vm iOLL1NPj/bWUddnBZ7++M2g7ZJVlyhM1O3FOL7sCVCh0ViTqnFKWXz/nHm9saaFgQdzVirR9OxQ2 2YSKYz9lu75WY1Rlgjxv96JCyhM9WaF7T9Uul5MngxbCrLUEMG0s1hs7ImGltyq6Dpn8aUYO2+yL miq0tPNDlCrVQEP2EDGjSLC/O2QpN+AwdcI56iRR9gp5BdvwkaEs/0RdqABLBvskM5Xdp9ZHNMux M+UUi9+g04tY6hIkuzz3c0mDIsvE/XkQaHeju/xLvjVI3/SLO9TPGheGG54Ctx6Ykg==
4

1 回答 1

0

要解码Base64 String,您可以使用以下命令:

private String decodeBase64(String coded){
    byte[] valueDecoded= new byte[0];
    try {
        valueDecoded = Base64.decode(coded.getBytes("UTF-8"), Base64.DEFAULT);
    } catch (UnsupportedEncodingException e) {
    }
    return new String(valueDecoded);
}
于 2018-08-07T06:09:47.737 回答