Files
godot-docs/classes/class_cryptokey.rst
Rémi Verschelde 2b4319bc29 Sync classref with current source
Changes order of brief/long descriptions and removes category
as per godotengine/godot#35132.
2020-01-15 00:51:47 +01:00

51 lines
2.0 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the CryptoKey.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_CryptoKey:
CryptoKey
=========
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
A cryptographic key (RSA).
Description
-----------
The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other :ref:`Resource<class_Resource>`.
They can be used to generate a self-signed :ref:`X509Certificate<class_X509Certificate>` via :ref:`Crypto.generate_self_signed_certificate<class_Crypto_method_generate_self_signed_certificate>` and as private key in :ref:`StreamPeerSSL.accept_stream<class_StreamPeerSSL_method_accept_stream>` along with the appropriate certificate.
**Note:** Not available in HTML5 exports.
Methods
-------
+---------------------------------------+---------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_CryptoKey_method_load>` **(** :ref:`String<class_String>` path **)** |
+---------------------------------------+---------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_CryptoKey_method_save>` **(** :ref:`String<class_String>` path **)** |
+---------------------------------------+---------------------------------------------------------------------------------------+
Method Descriptions
-------------------
.. _class_CryptoKey_method_load:
- :ref:`Error<enum_@GlobalScope_Error>` **load** **(** :ref:`String<class_String>` path **)**
Loads a key from ``path`` ("\*.key" file).
----
.. _class_CryptoKey_method_save:
- :ref:`Error<enum_@GlobalScope_Error>` **save** **(** :ref:`String<class_String>` path **)**
Saves a key to the given ``path`` (should be a "\*.key" file).