summaryrefslogtreecommitdiffstats
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-02 14:52:43 +0200
committerGitHub <noreply@github.com>2019-07-02 14:52:43 +0200
commite9d624d7ce1d56cf134599a62deea1f5a0848019 (patch)
tree8d4b7e398f6d52c1d1d24daeb6542a07e0675de3 /core/variant_call.cpp
parent4cb0887660861402fe6857662e622488adb86514 (diff)
parent564d93ff10b19dd15df6ea049bd7c9a9c99680c6 (diff)
downloadredot-engine-e9d624d7ce1d56cf134599a62deea1f5a0848019.tar.gz
Merge pull request #30239 from Faless/crypto/crypto_core
CryptoCore class to access to base crypto utils.
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index dc28f1ca02..811008e7c8 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -33,10 +33,10 @@
#include "core/color_names.inc"
#include "core/core_string_names.h"
#include "core/io/compression.h"
+#include "core/math/crypto_core.h"
#include "core/object.h"
#include "core/os/os.h"
#include "core/script_language.h"
-#include "thirdparty/misc/sha256.h"
typedef void (*VariantFunc)(Variant &r_ret, Variant &p_self, const Variant **p_args);
typedef void (*VariantConstructFunc)(Variant &r_ret, const Variant **p_args);
@@ -598,10 +598,7 @@ struct _VariantCall {
PoolByteArray::Read r = ba->read();
String s;
unsigned char hash[32];
- sha256_context sha256;
- sha256_init(&sha256);
- sha256_hash(&sha256, (unsigned char *)r.ptr(), ba->size());
- sha256_done(&sha256, hash);
+ CryptoCore::sha256((unsigned char *)r.ptr(), ba->size(), hash);
s = String::hex_encode_buffer(hash, 32);
r_ret = s;
}