Crypto

    Access to advanced cryptographic functionalities.

    The Crypto class allows you to access some more advanced cryptographic functionalities in Godot.

    Note: Not available in HTML5 exports.

    Generates a of cryptographically secure random bytes with given .



    • X509Certificate generate_self_signed_certificate ( key, String issuer_name=”CN=myserver,O=myorganisation,C=IT”, not_before=”20140101000000”, String not_after=”20340101000000” )

    Generates a self-signed from the given CryptoKey and issuer_name. The certificate validity will be defined by not_before and (first valid date and last valid date). The issuer_name must contain at least “CN=” (common name, i.e. the domain name), “O=” (organization, i.e. your company name), “C=” (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).

    A small example to generate an RSA key and a X509 self-signed certificate.

    1. var crypto = Crypto.new()
    2. var key = crypto.generate_rsa(4096)
    3. # Generate self-signed certificate using the given key.