• We've upgraded our forums. Please post any issues/requests in this thread.

Encrypt 24 byte array into 8 byte array in c#

cnr.chada

New Member
Joined
Apr 1, 2010
Messages
1 (0.00/day)
Likes
0
#1
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:

Kreij

Senior Monkey Moderator
Staff member
Joined
Feb 6, 2007
Messages
13,817 (3.49/day)
Likes
5,524
Location
Cheeseland (Wisconsin, USA)
Processor Intel Core 2 Quad QX9650 Extreme @ 3.0 GHz
Motherboard Asus Rampage Formula
Cooling ZeroTherm Nirvana NV120 Premium
Memory 8GB (4 x 2GB) Corsair Dominator PC2-8500
Video Card(s) 2 x Sapphire Radeon HD6970
Storage 2 x Seagate Barracuda 320GB in RAID 0
Display(s) Dell 3007WFP 30" LCD (2560 x 1600)
Case Thermaltake Armor w/ 250mm Side Fan
Audio Device(s) SupremeFX 8ch Audio
Power Supply Thermaltake Toughpower 750W Modular
Software Win8 Pro x64 / Cat 12.10
#2
I believe the original DES encryption encrypts into 8 byte blocks. I've never use it though.
It's rather slow and insecure.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,906 (6.24/day)
Likes
10,000
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#3
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