CapyKit/Documentation/Help/T_CapyKit_Helpers_SecurityHelper.md
2024-09-04 19:31:43 -05:00

7.6 KiB

SecurityHelper Class

A class that contains methods for managing secure data processing and cryptography.

Definition

Namespace: CapyKit.Helpers
Assembly: CapyKit (in CapyKit.dll) Version: 1.0.2

C#

public class SecurityHelper

F#

type SecurityHelper = class end
InheritanceObject → SecurityHelper

Constructors

SecurityHelper Initializes a new instance of the SecurityHelper class

Methods

CompareHashedPassword(Password, String, Byte[], IPasswordAlgorithm, Object[]) Compares an unencrypted password with a stored, encrypted existingPassword. This method uses the specified algorithm to retrieve the hashed version of the password and then compares it with the existingPassword.
CompareHashedPassword(T)(Password, String, Byte[], Object[]) Compares an unencrypted password with a stored, encrypted existingPassword. This method uses the specified password algorithm type T to retrieve the hashed version of the password and then compares it with the existingPassword.
CompareSessionID Compares two session identifiers.
CompareStrings Compare two strings as case sensative.
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetPassword(T)(String, Object[]) Retrieves a Password object using the specified password and generates a random salt value. Then it uses that salt to call the overloaded GetPassword(T)(String, Byte[], Object[]) method with the given password and the generated salt as arguments.
GetPassword(T)(String, Byte[], Object[]) Retrieves a Password object using the specified password, salt, and optional constructor arguments.
GetRandomBytes Generates a new byte array of the specified length with random values.
GetRandomPassword Gets a cryptographically strong random password.
GetRandomString(Int32) A convenience method to generate a random string of the specified length using all character sets.
GetRandomString(Int32, ValidCharacterCollection[]) Gets a cryptographically strong random string using the character values found in [!:VALID_CHARACTERS].
GetSalt Generates a random byte array that can act as a salt.
GetType Gets the Type of the current instance.
(Inherited from Object)
GetValidCharacterComposition Static method that returns a valid character composition based on the given ValidCharacterCollection parameters.
MemberwiseClone Creates a shallow copy of the current Object.
(Inherited from Object)
Pbkdf2(String) Generates a new Password object using the PBKDF2 algorithm with the provided password. This overload of the method generates a random salt value for added security.
Pbkdf2(String, Byte[]) Generates a new Password object using the PBKDF2 algorithm with the provided password and salt.
ToString Returns a string that represents the current object.
(Inherited from Object)

Fields

LOWER_CASE_CHARACTERS A string of all the lower case characters.
NUMBER_CHARACTERS A string of all the numeric characters.
SALT_SIZE Default size to use when generating a new salt.
SPECIAL_CHARACTERS A string of the most common non-alphanumeric characters.
UPPER_CASE_CHARACTERS A string of all the upper case characters.

See Also

Reference

CapyKit.Helpers Namespace