Tag Archives: encrypt

Make the user enter a password to use a program in C#

The example Display a simple password dialog before a program starts in C# displays a simple password form. It compares the value entered by the user with a string inside the program to decide whether the user entered the right … Continue reading

Posted in cryptography, dialogs, programs | Tagged , , , , , , , , , , | 1 Comment

Use steganography to hide one large picture inside another in C#

The example Use steganography to hide one picture inside another in C# explains how you can hide one image inside another. This example uses the same tools to hide a large image inside another large image so you can get … Continue reading

Posted in algorithms, cryptography, graphics, image processing, mathematics | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Use steganography to hide one picture inside another in C#

The example Use steganography to hide messages in an image in C# hides message bits in the least-significant color bits of randomly selected pixels within an image. The idea is that small changes to the least significant bits of a … Continue reading

Posted in algorithms, cryptography, graphics, image processing, mathematics | Tagged , , , , , , , , , , , , , , , , , , | 24 Comments

Use steganography to hide messages in an image in C#

Steganography is the science of hiding information within other information. For example, a watermark “hides” an image on a piece of paper. If you look at most paper currency at a low angle or if you hold it up to … Continue reading

Posted in algorithms, cryptography, graphics, image processing, mathematics | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Encrypt or decrypt files in C#

The following EncryptFile and DecryptFile methods encrypt or decrypt files at a very high level. // Encrypt or decrypt a file, saving the results in another file. public static void EncryptFile(string password, string in_file, string out_file) { CryptFile(password, in_file, out_file, … Continue reading

Posted in cryptography, files | Tagged , , , , , , , , , , , | 7 Comments

Use the .NET cryptography library to make extension methods that encrypt and decrypt strings in C#

This example uses the .NET cryptography library to make extension methods that make encrypting and decrypting strings easier. The .NET cryptography methods work most naturally with streams or byte arrays, not strings. To make working with strings easier, this program … Continue reading

Posted in algorithms, cryptography, extension methods, mathematics | Tagged , , , , , , , , , , , , , , , | 2 Comments