From 8e3f9aa68104fefc959d2d6af7cba3c11bfde3fb Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 6 Jun 2020 16:09:28 +0200 Subject: Implement RSA encryption/decryption. --- core/crypto/crypto.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/crypto/crypto.cpp') diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp index f1d13b0633..29d02e11df 100644 --- a/core/crypto/crypto.cpp +++ b/core/crypto/crypto.cpp @@ -88,6 +88,8 @@ void Crypto::_bind_methods() { ClassDB::bind_method(D_METHOD("generate_self_signed_certificate", "key", "issuer_name", "not_before", "not_after"), &Crypto::generate_self_signed_certificate, DEFVAL("CN=myserver,O=myorganisation,C=IT"), DEFVAL("20140101000000"), DEFVAL("20340101000000")); ClassDB::bind_method(D_METHOD("sign", "hash_type", "hash", "key"), &Crypto::sign); ClassDB::bind_method(D_METHOD("verify", "hash_type", "hash", "signature", "key"), &Crypto::verify); + ClassDB::bind_method(D_METHOD("encrypt", "key", "plaintext"), &Crypto::encrypt); + ClassDB::bind_method(D_METHOD("decrypt", "key", "ciphertext"), &Crypto::decrypt); } /// Resource loader/saver -- cgit v1.2.3