Click or drag to resize

Cipher Class

Provides general use cryptographic functions.
Inheritance Hierarchy
SystemObject
  GSF.Security.CryptographyCipher

Namespace: GSF.Security.Cryptography
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
public static class Cipher
View Source

The Cipher type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberSystemAllowsManagedEncryption Gets a flag that determines if system will allow use of managed, i.e., non-FIPS compliant, security algorithms.
Top
Methods
 NameDescription
Public methodStatic memberCreateAes Creates an Aes encryption algorithm that respects current FIPS setting.
Public methodStatic memberCreateSHA1 Creates a SHA1 hashing algorithm that respects current FIPS setting.
Public methodStatic memberCreateSHA256 Creates a SHA256 hashing algorithm that respects current FIPS setting.
Public methodStatic memberCreateSHA384 Creates a SHA384 hashing algorithm that respects current FIPS setting.
Public methodStatic memberCreateSHA512 Creates a SHA512 hashing algorithm that respects current FIPS setting.
Public Extension MethodDecrypt(Byte, String, CipherStrength) Returns a binary array of decrypted data for the given parameters.
Public Extension MethodDecrypt(String, String, CipherStrength) Returns a decrypted string from a Base64 encoded string of binary encrypted data from the given parameters.
Public Extension MethodDecrypt(Byte, Byte, Byte, CipherStrength) Returns a binary array of decrypted data for the given parameters.
Public Extension MethodDecrypt(Stream, Byte, Byte, CipherStrength) Returns a stream of decrypted data for the given parameters.
Public Extension MethodDecrypt(Byte, Int32, Int32, String, CipherStrength) Returns a binary array of decrypted data for the given parameters.
Public Extension MethodDecrypt(Byte, Int32, Int32, Byte, Byte, CipherStrength) Returns a binary array of decrypted data for the given parameters.
Public Extension MethodDecrypt(Stream, Stream, Byte, Byte, CipherStrength, ActionProcessProgressInt64) Decrypts input stream onto output stream for the given parameters.
Public methodStatic memberDecryptFile Creates a decrypted file from source file data.
Public Extension MethodEncrypt(Byte, String, CipherStrength) Returns a binary array of encrypted data for the given parameters.
Public Extension MethodEncrypt(String, String, CipherStrength) Returns a Base64 encoded string of the returned binary array of the encrypted data, generated with the given parameters.
Public Extension MethodEncrypt(Byte, Byte, Byte, CipherStrength) Returns a binary array of encrypted data for the given parameters.
Public Extension MethodEncrypt(Stream, Byte, Byte, CipherStrength) Returns a stream of encrypted data for the given parameters.
Public Extension MethodEncrypt(Byte, Int32, Int32, String, CipherStrength) Returns a binary array of encrypted data for the given parameters.
Public Extension MethodEncrypt(Byte, Int32, Int32, Byte, Byte, CipherStrength) Returns a binary array of encrypted data for the given parameters.
Public Extension MethodEncrypt(Stream, Stream, Byte, Byte, CipherStrength, ActionProcessProgressInt64) Encrypts input stream onto output stream for the given parameters.
Public methodStatic memberEncryptFile Creates an encrypted file from source file data.
Public methodStatic memberExportKeyIV Exports a key and initialization vector from the local system key cache.
Public methodStatic memberFlushCache Blocks current thread and waits for any pending save of local system key cache to complete.
Public methodStatic memberGetPasswordHash Gets the Base64 encoded SHA-256 hash of given user password.
Public methodStatic memberImportKeyIV Imports a key and initialization vector into the local system key cache.
Public methodStatic memberKeyIVExists Determines if a key and initialization vector exists for the given password in the local system key cache.
Public methodStatic memberReloadCache Manually loads keys into the local system key cache.
Top
Remarks
This class exists to simplify usage of basic cryptography functionality.
See Also