Crypto.RSASign
From Xojo Documentation
Method
Crypto.RSASign(Data As MemoryBlock, PrivateKey As String) As MemoryBlock
New in 2013r4
Supported for all project types and targets.
New in 2013r4
Supported for all project types and targets.
Signs the data block using the specified PrivateKey using PKCS v1.5 with SHA1.
Sample Code
Sign a message:
Var privateKey As String
Var publicKey As String
If Crypto.RSAGenerateKeyPair( 1024, privateKey, publicKey ) Then
// 1024-bit private and public keys were generated
Var msg As String = "this is a test"
Var signature As MemoryBlock = Crypto.RSASign( msg, privateKey )
If signature <> Nil Then
// msg was successfully signed
End If
End If
Var publicKey As String
If Crypto.RSAGenerateKeyPair( 1024, privateKey, publicKey ) Then
// 1024-bit private and public keys were generated
Var msg As String = "this is a test"
Var signature As MemoryBlock = Crypto.RSASign( msg, privateKey )
If signature <> Nil Then
// msg was successfully signed
End If
End If