GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
GenerallyPositive.Cryptography Class Reference
Inheritance diagram for GenerallyPositive.Cryptography:
GenerallyPositive.ICryptography GenerallyPositive.IAllowCryptoAction GenerallyPositive.IAllowCryptoKeyGenInput GenerallyPositive.IAllowCryptoConfig GenerallyPositive.IAllowToGPALObject< TResult > GenerallyPositive.IAllowCryptoAction GenerallyPositive.IAllowCryptoGenerateKey GenerallyPositive.IAllowCryptoGenerateIV GenerallyPositive.IAllowCryptoInput GenerallyPositive.IAllowCryptoGenerateKey GenerallyPositive.IAllowCryptoInput GenerallyPositive.IAllowCryptoHash GenerallyPositive.IAllowCryptoVerify GenerallyPositive.IAllowCryptoSign GenerallyPositive.IAllowCryptoDecrypt GenerallyPositive.IAllowCryptoEncrypt GenerallyPositive.IAllowCryptoGenerateIV GenerallyPositive.IAllowCryptoGenerateKey

Public Member Functions

IAllowCryptoConfig WithAlgorithm (CryptoAlgorithm alg)
IAllowCryptoConfig WithKey (byte[] key)
IAllowCryptoConfig WithIV (byte[] iv)
IAllowCryptoConfig WithMode (CryptoMode mode)
IAllowCryptoConfig WithPadding (CryptoPadding padding)
IAllowCryptoConfig WithSalt (byte[] salt)
IAllowCryptoConfig WithSignature (byte[] signature)
IAllowCryptoConfig WithIterationCount (int count)
IAllowCryptoAction WithInputData (byte[] data)
IAllowCryptoConfig GenerateIV (out byte[] iv)
IAllowCryptoConfig Encrypt (out byte[] encryptedData)
IAllowCryptoConfig Decrypt (out string decryptedValue)
IAllowCryptoConfig Sign (out byte[] signature)
IAllowCryptoConfig Verify (out bool isValid)
IAllowCryptoConfig Hash (out byte[] hash)
IAllowCryptoConfig GenerateKey (out byte[] key)
ICryptography ToGPALObject ()

Static Public Member Functions

static byte[] GenerateEcdsaKeyPair ()
static byte[] GenerateRsaKeyPair ()

Static Public Attributes

static byte []
 A new ECDSA key pair on the P-256 curve, for Sign and Verify.
The same shape as GenerateRsaKeyPair: the private key PKCS#8 encoded and the public key X.509 encoded, which is what WithKey takes for each half.

Detailed Description

Definition at line 36 of file Cryptography.cs.

Member Function Documentation

◆ Decrypt()

IAllowCryptoConfig GenerallyPositive.Cryptography.Decrypt ( out string decryptedValue)

Implements GenerallyPositive.IAllowCryptoDecrypt.

Definition at line 202 of file Cryptography.cs.

◆ Encrypt()

IAllowCryptoConfig GenerallyPositive.Cryptography.Encrypt ( out byte[] encryptedData)

Implements GenerallyPositive.IAllowCryptoEncrypt.

Definition at line 167 of file Cryptography.cs.

◆ GenerateEcdsaKeyPair()

byte[] GenerallyPositive.Cryptography.GenerateEcdsaKeyPair ( )
static

Definition at line 575 of file Cryptography.cs.

◆ GenerateIV()

IAllowCryptoConfig GenerallyPositive.Cryptography.GenerateIV ( out byte[] iv)

Implements GenerallyPositive.IAllowCryptoGenerateIV.

Definition at line 132 of file Cryptography.cs.

◆ GenerateKey()

IAllowCryptoConfig GenerallyPositive.Cryptography.GenerateKey ( out byte[] key)

Implements GenerallyPositive.IAllowCryptoGenerateKey.

Definition at line 328 of file Cryptography.cs.

◆ GenerateRsaKeyPair()

byte[] GenerallyPositive.Cryptography.GenerateRsaKeyPair ( )
static

Definition at line 597 of file Cryptography.cs.

◆ Hash()

IAllowCryptoConfig GenerallyPositive.Cryptography.Hash ( out byte[] hash)

Implements GenerallyPositive.IAllowCryptoHash.

Definition at line 303 of file Cryptography.cs.

◆ Sign()

IAllowCryptoConfig GenerallyPositive.Cryptography.Sign ( out byte[] signature)

Implements GenerallyPositive.IAllowCryptoSign.

Definition at line 238 of file Cryptography.cs.

◆ ToGPALObject()

ICryptography GenerallyPositive.Cryptography.ToGPALObject ( )

Implements GenerallyPositive.IAllowToGPALObject< TResult >.

Definition at line 622 of file Cryptography.cs.

◆ Verify()

IAllowCryptoConfig GenerallyPositive.Cryptography.Verify ( out bool isValid)

Implements GenerallyPositive.IAllowCryptoVerify.

Definition at line 268 of file Cryptography.cs.

◆ WithAlgorithm()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithAlgorithm ( CryptoAlgorithm alg)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 51 of file Cryptography.cs.

◆ WithInputData()

IAllowCryptoAction GenerallyPositive.Cryptography.WithInputData ( byte[] data)

Implements GenerallyPositive.IAllowCryptoInput.

Definition at line 126 of file Cryptography.cs.

◆ WithIterationCount()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithIterationCount ( int count)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 115 of file Cryptography.cs.

◆ WithIV()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithIV ( byte[] iv)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 63 of file Cryptography.cs.

◆ WithKey()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithKey ( byte[] key)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 57 of file Cryptography.cs.

◆ WithMode()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithMode ( CryptoMode mode)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 69 of file Cryptography.cs.

◆ WithPadding()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithPadding ( CryptoPadding padding)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 75 of file Cryptography.cs.

◆ WithSalt()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithSalt ( byte[] salt)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 104 of file Cryptography.cs.

◆ WithSignature()

IAllowCryptoConfig GenerallyPositive.Cryptography.WithSignature ( byte[] signature)

Implements GenerallyPositive.IAllowCryptoConfig.

Definition at line 110 of file Cryptography.cs.

Member Data Documentation

◆ byte

GenerallyPositive.Cryptography.byte
static

A new ECDSA key pair on the P-256 curve, for Sign and Verify.
The same shape as GenerateRsaKeyPair: the private key PKCS#8 encoded and the public key X.509 encoded, which is what WithKey takes for each half.

Returns
The private key and the public key, or nulls when generation failed

Definition at line 575 of file Cryptography.cs.


The documentation for this class was generated from the following file: