wodCrypt Sign, C# Verifies signature (General questions)
This code snippet shows interoperability between wodCrypt (signs data) and NET C# code (verifies signature).
Code to sign text ABCD with key stored as XML (so can be loaded by C#):
[code] Dim k As New Keys
k.FromXmlString ( <RSAKeyValue><Modulus>26NtFkEYNumpdM9/1Ie+TnoBaOCi6ZtGdrfFcFP7Aq/0zSt2iLPeu1mIwpO4x445mdsm3D+R5fgF/5bdSXPmh7QpeElG5GbkCO6YnLRoktOLu2TtEME59ripyMVeM8xahJj+8BnkKsZrwj2mPFlYxmc+DBIuRGm3f8FfDf5kpmc=</Modulus><Exponent>AQAB</Exponent><P>7p6tANYwpDzObpAq5sJiBJA01DuDA89ZpcO6t3JGf8q+kp5gcq5sgwfqVvxHgjCP3kN1IdXLs4zLVjVm+VGpfQ==</P><Q>66LSIRclT3mcWJkqiRj3gxeKIuQZ6KyPMJZqZGGcp3uwHblJr1bJrlLsqz2RwDdnmIhuEWM5gOCdl93lQ8D0sw==</Q><DP>oJ5qcY+7ujG7+qxMVHwvoka3aMyOSfg+rdfsTSM81TRRxzuYTFmgbSrc0KSMNdQeY0whAh95OGjjTiowIE6ZuQ==</DP><DQ>OWtpzQp42w8FXEmmpdXhqp432RzAe4RhODPPJTrsE5v+ZJ/cJs/9QW+PoILWW4KkyfSk7bPCNXeGr5Uw4vvIJQ==</DQ><InverseQ>K/ekbIbFzWufoBbhJz1U/8+XWXCei5og/tWyhvWLsaFnushtRzU8k92/VI9F+CHtHoEjwHtZaalRNoL1zoVvxQ==</InverseQ><D>Sky8qFyY7mqZEpTnL2REMpP/ShVDxzbp3VtJhThDn6MacxWS4afHXyVoqDoEti0cuzlxqewvVNZUYSQN870rbHhMivKOzyuTcP7yG+/Kvmk31LroV5jOOjAmtLyzt5hAdTDg9UBmweJzeL//aH3oNHkOhVj3KczDJXmRFRhqwbE=</D></RSAKeyValue> )
Dim outb As New MemBlob
Dim indata As New MemBlob
indata.Text = ABCD
Dim crypt As New wodCryptCom
crypt.Type = RSA
crypt.SecretKey = k.PrivateKey(RSAkey)
crypt.Sign indata, outb
Debug.Print outb.ToBase64[/code]Result:
[code]IRH1ZMSKABNYFS/NRIIrG9LJ03aQ3oQ3qifW9qjI0tdJO/cDCP+f4FLUKCzoRpHb7hkoJpy9yKUX6nhQCtKd/sL9WfYbZwbKhB0oVja/qrN3XprFcqi+qLZ9qcbibkLT1hiJiDCUxCg61sGwfTjEoINcVX/4T4CxveSH1HKzDZI=[/code]