0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 14:56:16 +00:00
termux-packages/x11-packages/godot/crypto_core.cpp.patch
2023-03-09 17:34:23 +03:00

86 lines
3.1 KiB
Diff

--- godot-3.5.1-stable/core/crypto/crypto_core.cpp 2022-09-28 01:03:35.000000000 +0300
+++ godot-3.5.1-stable/core/crypto/crypto_core.cpp.patch 2023-02-10 11:41:17.183264630 +0300
@@ -48,17 +48,17 @@
}
Error CryptoCore::MD5Context::start() {
- int ret = mbedtls_md5_starts_ret((mbedtls_md5_context *)ctx);
+ int ret = mbedtls_md5_starts((mbedtls_md5_context *)ctx);
return ret ? FAILED : OK;
}
Error CryptoCore::MD5Context::update(const uint8_t *p_src, size_t p_len) {
- int ret = mbedtls_md5_update_ret((mbedtls_md5_context *)ctx, p_src, p_len);
+ int ret = mbedtls_md5_update((mbedtls_md5_context *)ctx, p_src, p_len);
return ret ? FAILED : OK;
}
Error CryptoCore::MD5Context::finish(unsigned char r_hash[16]) {
- int ret = mbedtls_md5_finish_ret((mbedtls_md5_context *)ctx, r_hash);
+ int ret = mbedtls_md5_finish((mbedtls_md5_context *)ctx, r_hash);
return ret ? FAILED : OK;
}
@@ -74,17 +74,17 @@
}
Error CryptoCore::SHA1Context::start() {
- int ret = mbedtls_sha1_starts_ret((mbedtls_sha1_context *)ctx);
+ int ret = mbedtls_sha1_starts((mbedtls_sha1_context *)ctx);
return ret ? FAILED : OK;
}
Error CryptoCore::SHA1Context::update(const uint8_t *p_src, size_t p_len) {
- int ret = mbedtls_sha1_update_ret((mbedtls_sha1_context *)ctx, p_src, p_len);
+ int ret = mbedtls_sha1_update((mbedtls_sha1_context *)ctx, p_src, p_len);
return ret ? FAILED : OK;
}
Error CryptoCore::SHA1Context::finish(unsigned char r_hash[20]) {
- int ret = mbedtls_sha1_finish_ret((mbedtls_sha1_context *)ctx, r_hash);
+ int ret = mbedtls_sha1_finish((mbedtls_sha1_context *)ctx, r_hash);
return ret ? FAILED : OK;
}
@@ -100,17 +100,17 @@
}
Error CryptoCore::SHA256Context::start() {
- int ret = mbedtls_sha256_starts_ret((mbedtls_sha256_context *)ctx, 0);
+ int ret = mbedtls_sha256_starts((mbedtls_sha256_context *)ctx, 0);
return ret ? FAILED : OK;
}
Error CryptoCore::SHA256Context::update(const uint8_t *p_src, size_t p_len) {
- int ret = mbedtls_sha256_update_ret((mbedtls_sha256_context *)ctx, p_src, p_len);
+ int ret = mbedtls_sha256_update((mbedtls_sha256_context *)ctx, p_src, p_len);
return ret ? FAILED : OK;
}
Error CryptoCore::SHA256Context::finish(unsigned char r_hash[32]) {
- int ret = mbedtls_sha256_finish_ret((mbedtls_sha256_context *)ctx, r_hash);
+ int ret = mbedtls_sha256_finish((mbedtls_sha256_context *)ctx, r_hash);
return ret ? FAILED : OK;
}
@@ -178,16 +178,16 @@
}
Error CryptoCore::md5(const uint8_t *p_src, int p_src_len, unsigned char r_hash[16]) {
- int ret = mbedtls_md5_ret(p_src, p_src_len, r_hash);
+ int ret = mbedtls_md5(p_src, p_src_len, r_hash);
return ret ? FAILED : OK;
}
Error CryptoCore::sha1(const uint8_t *p_src, int p_src_len, unsigned char r_hash[20]) {
- int ret = mbedtls_sha1_ret(p_src, p_src_len, r_hash);
+ int ret = mbedtls_sha1(p_src, p_src_len, r_hash);
return ret ? FAILED : OK;
}
Error CryptoCore::sha256(const uint8_t *p_src, int p_src_len, unsigned char r_hash[32]) {
- int ret = mbedtls_sha256_ret(p_src, p_src_len, r_hash, 0);
+ int ret = mbedtls_sha256(p_src, p_src_len, r_hash, 0);
return ret ? FAILED : OK;
}