CURL.SetOptionRandomFile
------------------------

Sets random file.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md).

MBS( "CURL.SetOptionRandomFile"; curl; Value { ; Encoding } ) 

**MBS**( **"CURL.SetOptionRandomFile";** /\* Sets random file. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* File path for SSL engine.e.g. "/tmp/test.txt" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is UTF-8.e.g. "utf8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | File path for SSL engine. | "/tmp/test.txt" |  |
| Encoding | The text encoding for text parameter.    Default is UTF-8.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "utf8" | Optional |

### Result

Returns "OK" on success.

### Description

Sets random file.  
Pass a file path. The file will be used to read from to seed the random engine for SSL. The more random the specified file is, the more secure the SSL connection will become.  
  
Starting with version 8.0 the plugin will always use UTF-8 encoding for file path on Linux and macOS. For macOS we also do the unicode character normalization for file names for you.  
### See also

- [CURL.SetOptionCookieFile](CURLSetOptionCookieFile.md)
- [CURL.SetOptionCRLFile](CURLSetOptionCRLFile.md)
- [CURL.SetOptionNETRCFile](CURLSetOptionNETRCFile.md)

### Release notes

- **Version 13.0**
    - Deprecated [CURL.SetOptionEGDSocket](https://www.mbsplugins.eu/CURLSetOptionEGDSocket.shtml), [CURL.SetOptionSSLEnableNPN](https://www.mbsplugins.eu/CURLSetOptionSSLEnableNPN.shtml), [CURL.SetOptionSocks5GSSAPIService](https://www.mbsplugins.eu/CURLSetOptionSocks5GSSAPIService.shtml) and [CURL.SetOptionRandomFile](https://www.mbsplugins.eu/CURLSetOptionRandomFile.shtml) functions.
- **Version 8.0**
    - Changed [CURL.SetOptionCAINFO](http://www.mbsplugins.eu/CURLSetOptionCAINFO.shtml), [CURL.SetOptionCAPATH](http://www.mbsplugins.eu/CURLSetOptionCAPATH.shtml), [CURL.SetOptionCookieFile](http://www.mbsplugins.eu/CURLSetOptionCookieFile.shtml), [CURL.SetOptionCookieJar](http://www.mbsplugins.eu/CURLSetOptionCookieJar.shtml), [CURL.SetOptionIssuerCert](http://www.mbsplugins.eu/CURLSetOptionIssuerCert.shtml), [CURL.SetOptionNETRCFile](http://www.mbsplugins.eu/CURLSetOptionNETRCFile.shtml), [CURL.SetOptionRandomFile](http://www.mbsplugins.eu/CURLSetOptionRandomFile.shtml), [CURL.SetOptionSSHPrivateKeyfile](http://www.mbsplugins.eu/CURLSetOptionSSHPrivateKeyfile.shtml), [CURL.SetOptionSSHPublicKeyfile](http://www.mbsplugins.eu/CURLSetOptionSSHPublicKeyfile.shtml), [CURL.SetOptionSSLCert](http://www.mbsplugins.eu/CURLSetOptionSSLCert.shtml), [CURL.SetOptionSSLKey](http://www.mbsplugins.eu/CURLSetOptionSSLKey.shtml) to use always UTF-8 on Mac/Linux and on Mac do the unicode transformation for decomposed characters to avoid trouble with special characters in file paths.

### Blog Entries

- [MBS FileMaker Plugin, version 13.0pr5](https://www.mbsplugins.de/archive/2023-01-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.6pr3](https://www.mbsplugins.de/archive/2017-12-13/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 21st December 2022

  
[CURL.SetOptionRTSPTransport](CURLSetOptionRTSPTransport.md) - [CURL.SetOptionRange](CURLSetOptionRange.md)

[HTML Version](CURLSetOptionRandomFile.shtml)