Skip to main content

RSAEncryptionPadding Class

NuGet: GHIElectronics.TinyCLR.Cryptography
Assembly: System.Security.Cryptography
Namespace: System.Security.Cryptography

Encryption-padding configuration — padding mode plus (for OAEP) the hash algorithm. Matches the .NET Framework type.

public sealed class RSAEncryptionPadding

Properties​

Pkcs1​

public static RSAEncryptionPadding Pkcs1 { get; }

PKCS#1 v1.5 encryption padding.

OaepSHA1​

public static RSAEncryptionPadding OaepSHA1 { get; }

OAEP padding using SHA-1.

OaepSHA256​

public static RSAEncryptionPadding OaepSHA256 { get; }

OAEP padding using SHA-256.

Mode​

public RSAEncryptionPaddingMode Mode { get; }

The padding mode.

OaepHashAlgorithm​

public HashAlgorithmName OaepHashAlgorithm { get; }

The hash algorithm used for OAEP padding.

Methods​

CreateOaep(HashAlgorithmName hashAlgorithm)​

public static RSAEncryptionPadding CreateOaep(HashAlgorithmName hashAlgorithm)

Creates OAEP padding using the given hash algorithm.

Returns RSAEncryptionPadding

Equals(RSAEncryptionPadding other)​

public bool Equals(RSAEncryptionPadding other)

Returns true if the two paddings are equal.

Returns bool

Equals(object obj)​

public override bool Equals(object obj)

Returns true if the object is an equal padding.

Returns bool

GetHashCode()​

public override int GetHashCode()

Returns the hash code for this padding.

Returns int

ToString()​

public override string ToString()

Returns a text description of this padding.

Returns string

==(RSAEncryptionPadding left, RSAEncryptionPadding right)​

public static bool operator ==(RSAEncryptionPadding left, RSAEncryptionPadding right)

Returns true if the two paddings are equal.

Returns bool operator

!=(RSAEncryptionPadding left, RSAEncryptionPadding right)​

public static bool operator !=(RSAEncryptionPadding left, RSAEncryptionPadding right)

Returns true if the two paddings differ.

Returns bool operator