• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Encrypt 24 byte array into 8 byte array in c#

cnr.chada

New Member
Joined
Apr 1, 2010
Messages
1 (0.00/day)
Hi,

I have an 24 byte array and would like to convert into 8 byte hash code in c# .

I would really appreciate for your help

Thanks,
chinna
 
Last edited:
I believe the original DES encryption encrypts into 8 byte blocks. I've never use it though.
It's rather slow and insecure.
 
SHA1 and MD5 are hashes. They are lossy. TripleDES and Rijndael (Rijndael is more secure) encrypt data. To make an 24 byte array only 8 bytes without losing any data, you need compression algorithms like the ZIP deflate method. How many bytes you get out of compression algorithms depends on how dense the input 24 byte arrays are.


So basically...
"encrypt" = TripleDES/Rijndael
"24 byte array ... into 8 byte array" = compression/deflate algorithms
 
Back
Top