Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Verifies RSA digital signature.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Sign | 6.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Algorithm | Which algorithm to use. Can be MD4, MD5, SHA, SHA1, MDC2, RIPEMD160, SHA224, SHA256, SHA384 or SHA512. | "SHA512" | |
InputType | The type of input data. Can be Text, Container, Image, Path, PDF, Data, base64 or Hex. |
"Text" | |
InputData | The actual input data. Text, container or file path. |
"Hello World" | |
InputEncoding | The text encoding for text input. Parameter is ignored for other cases. |
"UTF-8" | |
KeyType | The type of input for private or public key. Can be Text, Container, Image, Path, PDF, Data, base64 or Hex. |
"Text" | |
KeyData | The actual input data for the key. Text, container or file path. Must not be longer than the maximum key length of the given algorithm. If key is too short, we pad it with zero bytes. |
"Hello World" | |
KeyEncoding | The text encoding for text input for the key. Parameter is ignored for other cases. |
"UTF-8" | |
SigType | The type of input data for signature. Can be Text, Container, Image, Path, PDF, Data, base64 or Hex. |
"Text" | |
SigData | The actual input data for signature. Text, container or file path. |
"Hello World" | |
SigEncoding | The text encoding for text input. Parameter is ignored for other cases. |
"UTF-8" | |
PasswordType | The type of input for the password of the private key. Can be Text, Container, Image, Path, PDF, Data, base64 or Hex. |
"Text" | Optional |
PasswordData | The actual input data for the password of the private key. Text, container or file path. Must not be longer than the maximum key length of the given algorithm. If key is too short, we pad it with zero bytes. |
"Hello World" | Optional |
PasswordEncoding | The text encoding for text input. Parameter is ignored for other cases. |
"UTF-8" | Optional |
Returns 1, 0 or error.
Verify with all data in files:
MBS( "RSA.Verify";
"SHA1";
"Path"; "/Users/cs/Desktop/Sign and Verify/Create Keys.rtf"; "";
"Path"; "/Users/cs/Desktop/Sign and Verify/test.pub"; "";
"Path"; "/Users/cs/Desktop/Sign and Verify/signature.sha1"; "";
"Text"; ""; "" )
Verify with passing signature as hex text:
MBS( "RSA.Verify";
"SHA512";
"Text"; "Hello World. This is test data to sign."; "UTF8";
"Path"; "/Users/cs/Desktop/Sign and Verify/test.pub"; "";
"Hex"; "CD603612768BD33F2C0C0DE1E71658F9191..."; "";
"Text"; ""; "" )
Verify some text:
Set Variable [$r; Value:MBS( "RSA.Verify"; Table::Algorithm; "Text"; Table::Text to Sign; "UTF8"; "Text"; Table::PublicKey; "UTF8"; "Hex"; Table::Signature )]
If [$r = 1]
Show Custom Dialog ["Signature valid"]
Else If [$r = 0]
Show Custom Dialog ["Signature invalid"]
Else
Show Custom Dialog ["Error"; MBS("Text.RemovePrefix"; $r; "[MBS] ")]
End If
This function checks for a license.
Created 12nd March 2016, last changed 3th June 2021