koti
koti

Reputation: 1071

Unknown characters while converting encoded String to Base64 format

I need to decode the encoded string in my application.

But while converting encoded string to Base64 format using the following method

  String base64 = new String(Base64.decode(encrypted, 0));

I am getting the base64 string as the below format

@��Isz6�}{Aq�Mf����o|c����sY�g��f5������H����y����
E/Base64(27610): c����TQ�2� ;OF�ҏ�fz�J�L�"�E�T�8p�9�dF,�/kL]�|��Ͱ�b尷���=%��b��U�K�b�dӅU���f����բ{�D"
�%�����Nؑ3����E��
 ~$P��  ��a�B�r7�L(�
 Qi�������r�

I tried my encoded string in Base64 online,there also I am getting these kind of output.

I tried with another string,there I am getting the same Base64 as Alphanumeric.

I didnt understand why I am getting this kind of response.

please suggest

Upvotes: 1

Views: 1267

Answers (1)

DarkWanderer
DarkWanderer

Reputation: 8866

It's because the string is encrypted, not just encoded with base64. The bytes you see are encrypted data - you need to find out how it was encrypted and how to decrypt it.

Upvotes: 2

Related Questions