A simple encryption class that can be used to two-way encode/decode strings and byte buffers with single method calls.

Uses DES two way encryption that uses a pass key to provide roundtrip encoding/decoding.

Namespace: Westwind.Tools
Inherits: Object

MemberDescription
Constructor
Key Optional encrypt/decrypt key value that can be used globally for encryption decryption when passing the EncryptionKey as null to the methods of this class.
Key Replace this value with some unique key of your own Best set this in your App start up in a Static constructor
DecryptBytes Decrypts a Byte array from DES with an Encryption Key.
public static Byte[] DecryptBytes(Byte[] DecryptBuffer, String EncryptionKey)

public static Byte[] DecryptBytes(String DecryptString, String EncryptionKey)

DecryptString Decrypts a string using DES encryption and a pass key that was used for encryption.
public static String DecryptString(String DecryptString, String EncryptionKey)
EncryptBytes Encrypts a stream of bytes using an encryption key.
public static byte[] EncryptBytes(byte[] InputBuffer, string EncryptionKey)

public static EncryptBytes(string InputString, String EncryptionKey)

EncryptBytes Encodes a stream of bytes using DES encryption with a pass key. Lowest level method that handles all work.
public static Byte[] EncryptBytes( Byte[] InputString,
string EncryptionKey );

public static Byte[] EncryptBytes( string DecryptString,
string EncryptionKey );

EncryptString Encrypts a string using Triple DES encryption with a two way encryption key. String is returned as Base64 encoded value.
public static String EncryptString(String InputString, String EncryptionKey)
GZipFile
public static bool GZipFile( string Filename,
string OutputFile );
GZipMemory
public static Byte[] GZipMemory( Byte[] Buffer );

public static Byte[] GZipMemory( string Input );

public static Byte[] GZipMemory( string Filename,
bool IsFile );

Class Information


Assembly: wwappconfiguration.dll
Namespace: Westwind.Tools

System.Object Westwind.Tools.wwEncrypt

Last Updated: 1/28/2007 | Send topic feedback