StringEncrypter

Namespace: Babel.Licensing Assembly: Babel.Licensing.dll

A string encryptor class.

public static class StringEncrypter

Inheritance

objectStringEncrypter

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

Decrypt(string, string)

A string extension method that decrypts.

public static string Decrypt(this string self, string password)

Parameters

NameDescription

self string

The string to act on.

password string

The password used to encrypt.

Returns

NameDescription

The decrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are

Decrypt(string, string, IEncoding)

A string extension method that decrypts strings.

public static string Decrypt(this string self, string password, IEncoding encoding)

Parameters

NameDescription

self string

The string to act on.

password string

The password used to encrypt.

encoding IEncoding

The encrypted string encoding.

Returns

NameDescription

The decrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are null.

Decrypt(string, byte[])

A string extension method that decrypts.

public static string Decrypt(this string self, byte[] password)

Parameters

NameDescription

self string

The string to act on.

password byte[]

The password used to encrypt.

Returns

NameDescription

The decrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are

DecryptFromBytes(byte[], string)

A string extension method that decrypts.

public static string DecryptFromBytes(this byte[] self, string password)

Parameters

NameDescription

self byte[]

The byte array to act on.

password string

The password used to encrypt.

Returns

NameDescription

The decrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are

Encrypt(string, string)

A string extension method that encrypts.

public static string Encrypt(this string self, string password)

Parameters

NameDescription

self string

The string to act on.

password string

The password used to encrypt.

Returns

NameDescription

The encrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are

Encrypt(string, string, IEncoding)

A string extension method that encrypts strings.

public static string Encrypt(this string self, string password, IEncoding encoding)

Parameters

NameDescription

self string

The string to act on.

password string

The password used to encrypt.

encoding IEncoding

The encrypted string encoding.

Returns

NameDescription

The encrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are null.

Encrypt(string, byte[])

A string extension method that encrypts.

public static string Encrypt(this string self, byte[] password)

Parameters

NameDescription

self string

The string to act on.

password byte[]

The password used to encrypt.

Returns

NameDescription

The encrypted string.

Exceptions

NameDescription

Thrown when one or more required arguments are

EncryptToBytes(string, string)

A string extension method that encrypts strings.

public static byte[] EncryptToBytes(this string self, string password)

Parameters

NameDescription

self string

The string to act on.

password string

The password used to encrypt.

Returns

NameDescription

The encrypted string byte array.

Exceptions

NameDescription

Thrown when one or more required arguments are null.

Last updated