c - VB Unable to retrieve string after 3DES encryption -


initial conditions:

private thekey() byte = {1, 2, 3, 4, 5, 6, 7, 8} private vector() byte = {&h7c, &h22, &h2f, &hb2, &h92, &h7d, &h82, &h8a} 

i proceed encrypt string: "asd" (without quotations) using:

cryptostream(ms, des.createencryptor(thekey, vector), cryptostreammode.write) 

input: asd
output: 82804ad2b295e9e3

when try encrypt same string same key/vector on http://tripledes.online-domain-tools.com/ shown below (can't post image due reputation):

online 3des encryption

i different result.

my ultimate goal have output decrypted in c application. 2 3des encryptors giving 2 different results show stopper.. thoughts causing ?

thanks in advance!

a idea test crypto against other "oracle". 2 issues apparent use of online tool:

  • the key should given hex not text (the vb code has byte array). presumably 0102030405060708
  • 3des algorithm, vb code uses classic des - there's separate tripledescryptoserviceprovider 3des

however site gives me same encrypted text both des , 3des, may not reliable oracle anyway? try another, may need use plain text key (first 2 looked @ didn't offer hex input in obvious way)


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -