1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Encrypt 24 byte array into 8 byte array in c#

Discussion in 'Programming & Webmastering' started by cnr.chada, Apr 1, 2010.

  1. cnr.chada New Member

    Joined:
    Apr 1, 2010
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    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: Apr 1, 2010
  2. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,817 (3.64/day)
    Thanks Received:
    5,629
    Location:
    Cheeseland (Wisconsin, USA)
    I believe the original DES encryption encrypts into 8 byte blocks. I've never use it though.
    It's rather slow and insecure.
     
    10 Year Member at TPU
  3. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    20,026 (6.31/day)
    Thanks Received:
    9,275
    Location:
    IA, USA
    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
     
    Crunching for Team TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)