diff options
| author | Juan Linietsky | 2016-06-17 10:57:15 -0300 |
|---|---|---|
| committer | GitHub | 2016-06-17 10:57:15 -0300 |
| commit | ebbd705b63d44d6f25949f6fda9bacf8d974c8bd (patch) | |
| tree | 6f864e44b2b49035ea2c8dddfb03ad90a301904e /core/bind/core_bind.cpp | |
| parent | 9f2f8c91302e5a1b66c39ee32420288398742d64 (diff) | |
| parent | 7073bb0bb2c814b71f6128d249d7135dfca94b4a (diff) | |
| download | godot-ebbd705b63d44d6f25949f6fda9bacf8d974c8bd.tar.gz godot-ebbd705b63d44d6f25949f6fda9bacf8d974c8bd.tar.zst godot-ebbd705b63d44d6f25949f6fda9bacf8d974c8bd.zip | |
Merge pull request #5250 from bojidar-bg/add-sha256
Add sha256 to String and File/FileAccess.
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 31c0c0e20..3cdefc581 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1558,6 +1558,12 @@ String _File::get_md5(const String& p_path) const { } +String _File::get_sha256(const String& p_path) const { + + return FileAccess::get_sha256(p_path); + +} + String _File::get_line() const{ @@ -1748,6 +1754,7 @@ void _File::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_line"),&_File::get_line); ObjectTypeDB::bind_method(_MD("get_as_text"),&_File::get_as_text); ObjectTypeDB::bind_method(_MD("get_md5","path"),&_File::get_md5); + ObjectTypeDB::bind_method(_MD("get_sha256","path"),&_File::get_md5); ObjectTypeDB::bind_method(_MD("get_endian_swap"),&_File::get_endian_swap); ObjectTypeDB::bind_method(_MD("set_endian_swap","enable"),&_File::set_endian_swap); ObjectTypeDB::bind_method(_MD("get_error:Error"),&_File::get_error); |
