Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Creating encryption algorithm, need help with reading binary data

encryption binary streamwriter

  • Please log in to reply
2 replies to this topic

#1 null


    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 128 posts

Posted 02 April 2011 - 09:12 PM

I am creating an encryption algorithm which can read plaintext from a file. I have used
StreamReader and StreamWriter
for basic text file but now I need to read binary data.

I don't want to read binary data with a specific encoding. I am terrible at explaining but the algorithm re-arranges the binary characters and XOR's them similar to AES. How do I read the hex values(no encoding) and XOR them etc.

In C#
  • 0

#2 gregwarner


    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 02 April 2011 - 10:39 PM

I would use the BinaryReader object and the ReadInt32 method, so you can use the XOR operator. Tutorial: C# BinaryReader Tutorial
  • 0

Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid

#3 Cognitive33


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 07 July 2014 - 01:10 AM

Design and print labels to include text, graphics and Code 128, QR Code, Data Matrix and other barcodes with the Bar code Label software and print barcode labels by using Excel data in a Word mail merge

  • 0

Also tagged with one or more of these keywords: encryption, binary, streamwriter

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download