UA Bundle SDK .NET  2.2.3.276
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Groups Pages
UnifiedAutomation.UaBase.RsaUtils Class Reference

Defines functions to implement RSA cryptography. More...

Static Public Member Functions

static int GetPlainTextBlockSize (X509Certificate2 encryptingCertificate, bool useOaep)
 Return the plaintext block size for RSA OAEP encryption. More...
 
static int GetCipherTextBlockSize (X509Certificate2 encryptingCertificate, bool useOaep)
 Return the ciphertext block size for RSA OAEP encryption. More...
 
static int RsaPkcs15Sha1_GetSignatureLength (X509Certificate2 signingCertificate)
 Returns the length of a RSA PKCS#1 v1.5 signature of a SHA1 digest. More...
 
static byte[] RsaPkcs15Sha1_Sign (ArraySegment< byte > dataToSign, X509Certificate2 signingCertificate)
 Computes an RSA/SHA1 PKCS#1 v1.5 signature. More...
 
static bool RsaPkcs15Sha1_Verify (ArraySegment< byte > dataToVerify, byte[] signature, X509Certificate2 signingCertificate)
 Verifies an RSA/SHA1 PKCS#1 v1.5 signature. More...
 
static byte[] Encrypt (byte[] dataToEncrypt, X509Certificate2 encryptingCertificate, bool useOaep)
 Encrypts the data using RSA PKCS#1 v1.5 encryption. More...
 
static ArraySegment< byte > Encrypt (ArraySegment< byte > dataToEncrypt, X509Certificate2 encryptingCertificate, bool useOaep, ArraySegment< byte > outputBuffer)
 Encrypts the data using RSA PKCS#1 v1.5 or OAEP encryption. More...
 
static byte[] Decrypt (ArraySegment< byte > dataToDecrypt, X509Certificate2 encryptingCertificate, bool useOaep)
 Encrypts the data using RSA PKCS#1 v1.5 encryption. More...
 
static ArraySegment< byte > Decrypt (ArraySegment< byte > dataToDecrypt, X509Certificate2 encryptingCertificate, bool useOaep, ArraySegment< byte > outputBuffer)
 Des the message using RSA OAEP encryption. More...
 

Detailed Description

Defines functions to implement RSA cryptography.

Member Function Documentation

static byte [] UnifiedAutomation.UaBase.RsaUtils.Decrypt ( ArraySegment< byte >  dataToDecrypt,
X509Certificate2  encryptingCertificate,
bool  useOaep 
)
inlinestatic

Encrypts the data using RSA PKCS#1 v1.5 encryption.

static ArraySegment<byte> UnifiedAutomation.UaBase.RsaUtils.Decrypt ( ArraySegment< byte >  dataToDecrypt,
X509Certificate2  encryptingCertificate,
bool  useOaep,
ArraySegment< byte >  outputBuffer 
)
inlinestatic

Des the message using RSA OAEP encryption.

static byte [] UnifiedAutomation.UaBase.RsaUtils.Encrypt ( byte[]  dataToEncrypt,
X509Certificate2  encryptingCertificate,
bool  useOaep 
)
inlinestatic

Encrypts the data using RSA PKCS#1 v1.5 encryption.

static ArraySegment<byte> UnifiedAutomation.UaBase.RsaUtils.Encrypt ( ArraySegment< byte >  dataToEncrypt,
X509Certificate2  encryptingCertificate,
bool  useOaep,
ArraySegment< byte >  outputBuffer 
)
inlinestatic

Encrypts the data using RSA PKCS#1 v1.5 or OAEP encryption.

static int UnifiedAutomation.UaBase.RsaUtils.GetCipherTextBlockSize ( X509Certificate2  encryptingCertificate,
bool  useOaep 
)
inlinestatic

Return the ciphertext block size for RSA OAEP encryption.

static int UnifiedAutomation.UaBase.RsaUtils.GetPlainTextBlockSize ( X509Certificate2  encryptingCertificate,
bool  useOaep 
)
inlinestatic

Return the plaintext block size for RSA OAEP encryption.

static int UnifiedAutomation.UaBase.RsaUtils.RsaPkcs15Sha1_GetSignatureLength ( X509Certificate2  signingCertificate)
inlinestatic

Returns the length of a RSA PKCS#1 v1.5 signature of a SHA1 digest.

static byte [] UnifiedAutomation.UaBase.RsaUtils.RsaPkcs15Sha1_Sign ( ArraySegment< byte >  dataToSign,
X509Certificate2  signingCertificate 
)
inlinestatic

Computes an RSA/SHA1 PKCS#1 v1.5 signature.

static bool UnifiedAutomation.UaBase.RsaUtils.RsaPkcs15Sha1_Verify ( ArraySegment< byte >  dataToVerify,
byte[]  signature,
X509Certificate2  signingCertificate 
)
inlinestatic

Verifies an RSA/SHA1 PKCS#1 v1.5 signature.


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