Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

RSA.GetPublicKey

Queries public key from private key.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Sign 6.2 Yes Yes Yes Yes Yes

MBS( "RSA.GetPublicKey"; KeyType; KeyData { ; KeyEncoding; PasswordType; PasswordData; PasswordEncoding } )

Parameters

Parameter Description Example value
KeyType The type of input for private key.
Can be Text, Container, Image, Path, PDF, Data, base64 or Hex.
"Path"
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.
"/Users/cs/desktop/test.pem"
KeyEncoding Optional
The text encoding for text input for the key.
Parameter is ignored for other cases.
PasswordType Optional
The type of input for the password of the private key.
Can be Text, Container, Image, Path, PDF, Data, base64 or Hex.
"Text"
PasswordData Optional
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"
PasswordEncoding Optional
The text encoding for text input.
Parameter is ignored for other cases.
"UTF-8"

Result

Returns text or error.

Description

Queries public key from private key.
You pass in private key and this function returns public key as PEM.
Returns public key in PEM format as text.

You can create a new private key using RSA.GeneratePrivateKey function.

See also

Example Databases


RSA.GeneratePrivateKey   -   RSA.PrivateDecrypt

Feedback: Report problem or ask question.




Links
MBS Xojo blog