diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2016-06-17 10:55:16 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2016-06-17 10:55:16 +0300 |
commit | 7073bb0bb2c814b71f6128d249d7135dfca94b4a (patch) | |
tree | 41015e5af4288ffc3e4cc83826f5c883d2498de6 /core/ustring.h | |
parent | 367aabf03080da8e4e72c9db56b0b2097c86d6b4 (diff) | |
download | redot-engine-7073bb0bb2c814b71f6128d249d7135dfca94b4a.tar.gz |
Add sha256 to String and File/FileAccess.
Probably does #4166
Diffstat (limited to 'core/ustring.h')
-rw-r--r-- | core/ustring.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/ustring.h b/core/ustring.h index fddb77b040..95096e8f76 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -140,6 +140,7 @@ public: static String num_int64(int64_t p_num,int base=10,bool capitalize_hex=false); static String chr(CharType p_char); static String md5(const uint8_t *p_md5); + static String hex_encode_buffer(const uint8_t *p_buffer, int p_len); bool is_numeric() const; double to_double() const; float to_float() const; @@ -193,6 +194,7 @@ public: uint32_t hash() const; /* hash the string */ uint64_t hash64() const; /* hash the string */ String md5_text() const; + String sha256_text() const; Vector<uint8_t> md5_buffer() const; inline bool empty() const { return length() == 0; } |