Closed CsloudX closed 3 years ago
You have to follow the proposal template and answer the questions provided for it to be considered. One of the important points to explain would be the reason for inclusion into core when you can clearly make it a plugin.
Thanks for sharing the snippets, but I'm curious what do you need these methods for? Godot does provide MD5/SHA functions, so I think it makes sense to have CRC implemented as well?
In any case, you are free to create an addon and share it on the AssetLib.
If you didn't know, we have a place to share plugin/addon/modules ideas at https://github.com/godot-extended-libraries/godot-ideas as well.
If performance is concern, then maybe these methods are worth implementing via GDNative or C++ modules approach. I'm maintaining Goost extension which aims to fulfill those needs, but then again there have to be at least some real-life use cases to justify implementing those methods anyways (specifically in the gamedev field, because CRC is surely more useful in other fields).
Keep in mind that Godot aims to be small.
I think engine is a powerful tools, and CRC is a common tool. CRC doesn't cause godot engine become bigger obvioursly. In my case, I can use CRC calculate OS.get_unique_id() to a sortly unique_id(), it cool. MD5/SHA doesn't meet my needs. I just wish can builtin. Sorry my english not good, I love Godot
MD5/SHA doesn't meet my needs.
Could you explain why it doesn't meet your needs?
CRC has many known vulnerabilities and is not recommended for anything that requires security. If performance is your concern (and MD5 is actually too slow for your needs), consider looking into xxHash (see https://github.com/godotengine/godot-proposals/issues/1386).
I can use CRC calculate OS.get_unique_id() to a sortly unique_id()
id | short_id | |
---|---|---|
MD5 | 52479854556874254 | 811AF586FCD417D9 |
SHA1 | 52479854556874254 | aed2cab49ac3a66d563fdc0aaef38f0c16c04f26 |
CRC16 | 52479854556874254 | F674 |
I wish covert my machine_id (very long) to a shortly id (maybe I can remeber it so easy, or need my friend tell me the id) and I think CRC is a basic tool.
Closing due to lack of support. (Also, the proposal still doesn't follow the template.)
If having a short ID is your goal, you can compute a MD5 checksum and store it in a differently encoded string (e.g. Base64), or only store the first 4-8 characters. Doing the latter will increase the risk of collisions though.
I wish godot can't add crc build-in support, because it so common tool. I implemented it myself by GDScript, But I Still wish it can provide by build-in.
I Love Godot So Much!