CryptoSys PKI Pro Manual

Rsa.KeyMatch(StringBuilder, StringBuilder) Method

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

Syntax

[C#]
public static int KeyMatch(
   StringBuilder sbPrivateKey,
   StringBuilder sbPublicKey 
)
[VB]
Public Shared Function KeyMatch (
   sbPrivateKey As StringBuilder,
   sbPublicKey As StringBuilder 
) As Integer

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

StringBuilder sbPublicKey = Rsa.ReadPublicKey(pubkeyFile);
StringBuilder sbPrivateKey = Rsa.ReadPrivateKey(prikeyFile, "password");
int n = Rsa.KeyMatch(sbPrivateKey, sbPublicKey);

See Also

VB6/C equivalent: RSA_KeyMatch

[Contents] [Index]

[PREV: Rsa.KeyMatch(String, String) Method...]   [Contents]   [Index]   
   [NEXT: Rsa.KeyValue Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.