Why is the size of the encrypted byte array different from its char [] representation?

I worked on some encryption / decryption algorithms, and I noticed that encrypted byte [] arrays were always 33 and char [] arrays were always 44. Does anyone know why this is

(I use Rijndael encryption.)

+3
source share
5 answers

Padding and text encoding . Most encryption algorithms have a block size, and the input must be padded to a multiple of this block size. In addition, the inclusion of binary data in the text usually includes the Base64 algorithm , which extends 3 bytes to 4 characters.

+3

, , , , . , , , 33/44 , 6 . , , , 64 , (, base64).

, , , .

+1

, , . , . , , .

: Heres Rijndael. , , , base64 , , , 3/4 .

+1

, , , , 1 10 .

, , : -)

0

, . 50 , .:)

0

Source: https://habr.com/ru/post/1704106/


All Articles