C# Class Mono.Security.Cryptography.PKCS1

ファイルを表示 Open project: runefs/Marvin Class Usage Examples

Public Methods

Method Description
Decrypt_OAEP ( RSA rsa, HashAlgorithm hash, byte C ) : byte[]
Decrypt_v15 ( RSA rsa, byte C ) : byte[]
Encode_v15 ( HashAlgorithm hash, byte hashValue, int emLength ) : byte[]
Encrypt_OAEP ( RSA rsa, HashAlgorithm hash, RandomNumberGenerator rng, byte M ) : byte[]
Encrypt_v15 ( RSA rsa, RandomNumberGenerator rng, byte M ) : byte[]
I2OSP ( byte x, int size ) : byte[]
I2OSP ( int x, int size ) : byte[]
MGF1 ( HashAlgorithm hash, byte mgfSeed, int maskLen ) : byte[]
OS2IP ( byte x ) : byte[]
RSADP ( RSA rsa, byte c ) : byte[]
RSAEP ( RSA rsa, byte m ) : byte[]
RSASP1 ( RSA rsa, byte m ) : byte[]
RSAVP1 ( RSA rsa, byte s ) : byte[]
Sign_v15 ( RSA rsa, HashAlgorithm hash, byte hashValue ) : byte[]
Verify_v15 ( RSA rsa, HashAlgorithm hash, byte hashValue, byte signature ) : bool
Verify_v15 ( RSA rsa, HashAlgorithm hash, byte hashValue, byte signature, bool tryNonStandardEncoding ) : bool

Private Methods

Method Description
Compare ( byte array1, byte array2 ) : bool
GetEmptyHash ( HashAlgorithm hash ) : byte[]
PKCS1 ( ) : System
xor ( byte array1, byte array2 ) : byte[]

Method Details

Decrypt_OAEP() public static method

public static Decrypt_OAEP ( RSA rsa, HashAlgorithm hash, byte C ) : byte[]
rsa System.Security.Cryptography.RSA
hash HashAlgorithm
C byte
return byte[]

Decrypt_v15() public static method

public static Decrypt_v15 ( RSA rsa, byte C ) : byte[]
rsa System.Security.Cryptography.RSA
C byte
return byte[]

Encode_v15() public static method

public static Encode_v15 ( HashAlgorithm hash, byte hashValue, int emLength ) : byte[]
hash HashAlgorithm
hashValue byte
emLength int
return byte[]

Encrypt_OAEP() public static method

public static Encrypt_OAEP ( RSA rsa, HashAlgorithm hash, RandomNumberGenerator rng, byte M ) : byte[]
rsa System.Security.Cryptography.RSA
hash HashAlgorithm
rng System.Security.Cryptography.RandomNumberGenerator
M byte
return byte[]

Encrypt_v15() public static method

public static Encrypt_v15 ( RSA rsa, RandomNumberGenerator rng, byte M ) : byte[]
rsa System.Security.Cryptography.RSA
rng System.Security.Cryptography.RandomNumberGenerator
M byte
return byte[]

I2OSP() public static method

public static I2OSP ( byte x, int size ) : byte[]
x byte
size int
return byte[]

I2OSP() public static method

public static I2OSP ( int x, int size ) : byte[]
x int
size int
return byte[]

MGF1() public static method

public static MGF1 ( HashAlgorithm hash, byte mgfSeed, int maskLen ) : byte[]
hash HashAlgorithm
mgfSeed byte
maskLen int
return byte[]

OS2IP() public static method

public static OS2IP ( byte x ) : byte[]
x byte
return byte[]

RSADP() public static method

public static RSADP ( RSA rsa, byte c ) : byte[]
rsa System.Security.Cryptography.RSA
c byte
return byte[]

RSAEP() public static method

public static RSAEP ( RSA rsa, byte m ) : byte[]
rsa System.Security.Cryptography.RSA
m byte
return byte[]

RSASP1() public static method

public static RSASP1 ( RSA rsa, byte m ) : byte[]
rsa System.Security.Cryptography.RSA
m byte
return byte[]

RSAVP1() public static method

public static RSAVP1 ( RSA rsa, byte s ) : byte[]
rsa System.Security.Cryptography.RSA
s byte
return byte[]

Sign_v15() public static method

public static Sign_v15 ( RSA rsa, HashAlgorithm hash, byte hashValue ) : byte[]
rsa System.Security.Cryptography.RSA
hash HashAlgorithm
hashValue byte
return byte[]

Verify_v15() public static method

public static Verify_v15 ( RSA rsa, HashAlgorithm hash, byte hashValue, byte signature ) : bool
rsa System.Security.Cryptography.RSA
hash HashAlgorithm
hashValue byte
signature byte
return bool

Verify_v15() public static method

public static Verify_v15 ( RSA rsa, HashAlgorithm hash, byte hashValue, byte signature, bool tryNonStandardEncoding ) : bool
rsa System.Security.Cryptography.RSA
hash HashAlgorithm
hashValue byte
signature byte
tryNonStandardEncoding bool
return bool