tsNetGenerateKey |
Type | function |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | tsNetGenerateKey(<pKeyLength>, <rPrivateKey>, <rPublicKey>, <pPassphrase>, [<pFormat])
|
Associations | tsnet |
Summary | Generates an RSA public/private key for use with SFTP
transfers.
|
Edition | Business |
Introduced | 8.1 |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Parameters | Name | Type | Description |
---|
pKeyLength | | The length of the RSA key to generate.
|
rPrivateKey | | A variable to store the RSA private key in.
|
rPublicKey | | A variable to store the RSA public key in.
|
pPassphrase | | The passphrase to protect the RSA private key with. Can be
blank.
|
pFormat | | Specifies the format that the generated keys are returned it.
Accepts "PKCS#8" or "PKCS#1", the default is "PKCS#1".
|
|
Example | local tPrivKey, tPubKey, tResult
put tsNetGenerateKey(2048, tPrivKey, tPubKey, "secretkey", "PKCS#8") into tResult
if tResult is not empty then
answer "Failed to generate RSA key"
end if
|
Values | Name | Type | Description |
---|
return | | The tsNetGenerateKey function returns an empty string if
successful, otherwise an error string will be returned.
|
|
Related | Library: tsNet
|
Description | Generates an RSA public/private key for use with SFTP
transfers.
|
Tags | externals |