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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
RSA.GeneratePrivateKey
Creates a new private key.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Sign | 6.2 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| Bits | The bit size. e.g. 1024, 2048, 4096, etc. Default is 4096. |
4096 | Optional |
| Exp | The exponent to use. Default is 65537. |
65537 | Optional |
| Algorithm | Which algorithm to use. Can be for example RC2, blowfish, AES128, AES192, AES256. See Encryption.Cipher. | "AES-128-CFB" | Optional |
| PasswordType | The type of input for optional password. Can be Text, Container, Image, Path, PDF, Data, base64 or Hex. |
"Text" | Optional |
| PasswordData | The actual input data for the password. Text, container or file path. |
"Hello World" | Optional |
| PasswordEncoding | The text encoding for text input. Parameter is ignored for other cases. |
"UTF-8" | Optional |
Result
Returns key as text or error.
Description
Creates a new private key.Returns the PEM formatted key as text.
As the PEM format contains base64 encoded DER data, you can remove header and footer line and use the result as base64 encoded DER key.
If you specify an algorithm and a key, we encrypt the PEM file. (New in 7.5)
Examples
Generate keys:
Set Variable [$privateKey; Value:MBS( "RSA.GeneratePrivateKey")]
Set Variable [$publickey; Value:MBS( "RSA.GetPublicKey"; "text"; $privateKey; "UTF-8")]
Set Field [Table::PrivateKey; $privateKey]
Set Field [Table::PublicKey; $publicKey]
Generate key with text password:
MBS( "RSA.GeneratePrivateKey"; 4096; 65537; "AES-128-CBC"; "text"; "Hello" )
See also
- Encryption.Cipher
- RSA.DecryptPrivateKey
- RSA.EncryptPrivateKey
- RSA.GetPublicKey
- RSA.PrivateDecrypt
- RSA.PrivateEncrypt
- RSA.PublicDecrypt
- RSA.PublicEncrypt
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 10.0pr5
- MBS FileMaker Plugin, version 7.5pr2
- MBS FileMaker Plugin 6.2 for OS X/Windows
- MBS FileMaker Plugin, version 6.2pr1
Release notes
- Version 10.0
- Improved error messages for RSA.GeneratePrivateKey, RSA.Verify, RSA.Sign.
- Version 7.5
- Improved RSA.GeneratePrivateKey to allow you to specify algorithm and encrypt keys.
Created 12nd March 2016, last changed 15th October 2017
RSA.EncryptPrivateKey - RSA.GetPublicKey
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins