I am trying to use cryptGenerateSignature to generate digital signature for document, but can't get it work, I believe I have to have "RSA private key and public key" first, I use terminal and "ssh-keygen -t rsa" command to generate private key and public key as 2 separate files, put it in to the function, the it returns "Pw==" only, does anyone know how to use this function.
This function seems to work OK for me.
First, I used this site from MS to get the right ssh command:
Then, I created a quick FMP demo program:
with this script being the only code in it:
CryptGenerateSignature ( CryptGenerateSignatureEx::text to encrypt ; "SHA512" ; CryptGenerateSignatureEx::rsa private key ; CryptGenerateSignatureEx::password )
The "crypt signature" field is a container and it correctly got a binary file signature when I ran the program.
Does this work for you?
Please let us know.