Does it matter for the security of AES how the byte array is encoded in C#? -


i have byte array encrypted using aes pass phrase encrypted using sha-256. works perfect, i'm wondering last part have encode byte array result of encryption. matter, robustness of end result how byte array encrypted, base64, conversion hexadecimal values, else?

logically speaking, doesn't matter since there aren't encoding methods , of time obvious one, base64, used. since i'm not versed cryptography want make sure.

take byte array example (random array of bytes example):

    [0] 182      [1] 238      [2] 54     [3] 24       [4] 69       [5] 224      [6] 105      [7] 13       [8] 5        [9] 52       [10]112      [11]71       [12]250      [13]163      [14]234      [15]234 

this gives possible result in base64 (random result, not match above):

ou+yuekilfrgif3hbh08vu8a== 

using bitconvertor transform hexadecimal values gives (random result, not match above):

a2ebca1945e8bc920532f068d27baef1 

it's simple convert above results respective byte array , hard part start.

does matter, robustness of end result how byte array encrypted, base64, conversion hexadecimal values, else?

no, not @ all. long you're encoding in lossless format (which both base64 , hex are) that's fine. don't use encoding.ascii.getstring(...) - lossy , inappropriate. (don't use encoding @ task.)

just ask whether reverse encoding , original bytes - if so, you're fine. (and that's true hex , base64, assuming it's implemented.)


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -