Click or drag to resize

RsaKeyMatch(StringBuilder, StringBuilder) Method

Verify that a pair of "internal" RSA private and public key strings are matched.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.25611 (23.0.0.0)
Syntax
public static int KeyMatch(
	StringBuilder sbPrivateKey,
	StringBuilder sbPublicKey
)

Parameters

sbPrivateKey  StringBuilder
Internal RSA private key string
sbPublicKey  StringBuilder
Internal RSA public key string

Return Value

Int32
0=valid key pair, or negative error code
Example
C#
StringBuilder sbPublicKey = Rsa.ReadPublicKey(pubkeyFile);
StringBuilder sbPrivateKey = Rsa.ReadPrivateKey(prikeyFile, "password");
int n = Rsa.KeyMatch(sbPrivateKey, sbPublicKey);
See Also