You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Implement sign and verify in crypto.
This commit is contained in:
@@ -109,6 +109,7 @@ private:
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
static X509CertificateMbedTLS *default_certs;
|
||||
mbedtls_md_type_t _md_type_from_hashtype(HashingContext::HashType p_hash_type, int &r_size);
|
||||
|
||||
public:
|
||||
static Crypto *create();
|
||||
@@ -120,6 +121,8 @@ public:
|
||||
virtual PoolByteArray generate_random_bytes(int p_bytes);
|
||||
virtual Ref<CryptoKey> generate_rsa(int p_bytes);
|
||||
virtual Ref<X509Certificate> generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after);
|
||||
virtual Vector<uint8_t> sign(HashingContext::HashType p_hash_type, Vector<uint8_t> p_hash, Ref<CryptoKey> p_key);
|
||||
virtual bool verify(HashingContext::HashType p_hash_type, Vector<uint8_t> p_hash, Vector<uint8_t> p_signature, Ref<CryptoKey> p_key);
|
||||
|
||||
CryptoMbedTLS();
|
||||
~CryptoMbedTLS();
|
||||
|
||||
Reference in New Issue
Block a user