C# Class Microsoft.Protocols.TestSuites.MS_WOPI.RSACryptoContext

A class is used to support RSA crypt operation.
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
SignDataWithCurrentPublicKey ( byte originalData ) : byte[]

A method is used to sign the data with current key-pairs. The signed data only pass the validation by using current public key.

SignDataWithOldPublicKey ( byte originalData ) : byte[]

A method is used to sign the data with old key-pairs. The signed data only pass the validation by using old public key.

VerifySignedDataUsingCurrentKey ( byte signedData, byte originalData ) : bool

A method is used to validate the signed data by using current public key.

VerifySignedDataUsingOldKey ( byte signedData, byte originalData ) : bool

A method is used to validate the signed data by using old public key.

Private Methods

Method Description
SignData ( byte originalData, byte fullkeyBlob ) : byte[]

A method is used to sign the data with specified key-pairs. The signed data only pass the validation by using the public key part of the specified key-pairs.

VerifySignedData ( byte signedData, byte originalData, byte publicKeyBlob ) : bool

A method is used to validate the signed data by using specified public key.

Method Details

SignDataWithCurrentPublicKey() public static method

A method is used to sign the data with current key-pairs. The signed data only pass the validation by using current public key.
public static SignDataWithCurrentPublicKey ( byte originalData ) : byte[]
originalData byte A parameter represents the binaries data which will be signed with current key-pairs.
return byte[]

SignDataWithOldPublicKey() public static method

A method is used to sign the data with old key-pairs. The signed data only pass the validation by using old public key.
public static SignDataWithOldPublicKey ( byte originalData ) : byte[]
originalData byte A parameter represents the binaries data which will be signed with old key-pairs.
return byte[]

VerifySignedDataUsingCurrentKey() public static method

A method is used to validate the signed data by using current public key.
public static VerifySignedDataUsingCurrentKey ( byte signedData, byte originalData ) : bool
signedData byte A parameter represents the signed data which will be validate.
originalData byte A parameter represents the original data which is used to execute the validation.
return bool

VerifySignedDataUsingOldKey() public static method

A method is used to validate the signed data by using old public key.
public static VerifySignedDataUsingOldKey ( byte signedData, byte originalData ) : bool
signedData byte A parameter represents the signed data which will be validate.
originalData byte A parameter represents the original data which is used to execute the validation.
return bool