Tag Archives: cryptography

RC4 cypher in C#

Main method:

Usage:

ROT-13 cypher in C#

ROT-13 is a letter substitution cypher that replaces a letter with the letter 13 letters after it in the alphabet. ROT-13 is an example of the Caesar cypher with the difference that Caesar cypher allows you to specify the number of letters to shift.

Main method:

Usage:

Atom-128 algorithm in C#

Encode method:

Decode method:

Usage:

How to encrypt and decrypt files in C#

The following snippets will allow you to encrypt and decrypt files in C#.

Needless to say there are numerous methods that this can be achieved but for the reasons I will explain at the end I came about using this one in my projects.

Also keep in mind that assuming you want to implement something like this in your project you should extend the error catching to detect invalid key lengths, file locations and so on.