summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp10
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp5
2 files changed, 7 insertions, 8 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index bebd5b2412..9c10c05b59 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -34,6 +34,7 @@
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/io/zip_io.h"
+#include "core/math/crypto_core.h"
#include "core/os/file_access.h"
#include "core/project_settings.h"
#include "core/script_language.h"
@@ -43,7 +44,6 @@
#include "editor_node.h"
#include "editor_settings.h"
#include "scene/resources/resource_format_text.h"
-#include "thirdparty/misc/md5.h"
static int _get_pad(int p_alignment, int p_n) {
@@ -323,13 +323,11 @@ Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_pa
}
{
- MD5_CTX ctx;
- MD5Init(&ctx);
- MD5Update(&ctx, (unsigned char *)p_data.ptr(), p_data.size());
- MD5Final(&ctx);
+ unsigned char hash[16];
+ CryptoCore::md5(p_data.ptr(), p_data.size(), hash);
sd.md5.resize(16);
for (int i = 0; i < 16; i++) {
- sd.md5.write[i] = ctx.digest[i];
+ sd.md5.write[i] = hash[i];
}
}
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index 2bfc77325f..bc507e91b2 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -30,6 +30,7 @@
#include "editor_scene_importer_gltf.h"
#include "core/io/json.h"
+#include "core/math/crypto_core.h"
#include "core/math/math_defs.h"
#include "core/os/file_access.h"
#include "core/os/os.h"
@@ -37,7 +38,6 @@
#include "scene/3d/mesh_instance.h"
#include "scene/animation/animation_player.h"
#include "scene/resources/surface_tool.h"
-#include "thirdparty/misc/base64.h"
uint32_t EditorSceneImporterGLTF::get_import_flags() const {
@@ -279,7 +279,8 @@ static Vector<uint8_t> _parse_base64_uri(const String &uri) {
Vector<uint8_t> buf;
buf.resize(strlen / 4 * 3 + 1 + 1);
- int len = base64_decode((char *)buf.ptr(), (char *)substr.get_data(), strlen);
+ size_t len = 0;
+ ERR_FAIL_COND_V(CryptoCore::b64_decode(buf.ptrw(), buf.size(), &len, (unsigned char *)substr.get_data(), strlen) != OK, Vector<uint8_t>());
buf.resize(len);