Open golddotasksquestions opened 3 years ago
Is there a reason why this should be core and not an add-on in the asset library?
It's a GDScript feature request.
You can create your own methods in GDScript. I don't see a reason why this can't be done with an add-on.
Currently we have the the Crypto class, and the possibility to encrypt files while writing them, but neither of those seem to provide simple string encryption
See also: #201
The
File
class hasopen
,open_compressed
,open_encrypted
andopen_encrypted_with_pass
methods, but it only allow you to work with files in the file system, not in memory.
Honestly surprised that 4.0 is around the corner and we still can't get a simple string encryption smh.
@PrinceMerluza Please don't bump issues without contributing significant new information. Use the :+1: reaction button on the first post instead.
much needed functionality.
@aanishacharyaa Please don't bump issues without contributing significant new information. Use the :+1: reaction button on the first post instead.
Describe the project you are working on
I am looking for a simple method to decrypt and encrypt strings in GDScript. This has been requested before https://github.com/godotengine/godot/issues/1969 (since 2015) https://github.com/godotengine/godot/pull/5868
Describe the problem or limitation you are having in your project
Currently we have the the Crypto class, and the possibility to encrypt files while writing them, but neither of those seem to provide simple string encryption, at least not in a straight forward that would be very intuitive or simple enough for a beginner. Also I don't want to create and write, open and read a file every time I just want to encrypt/decrypt a string.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would make a simple string encryption a lot easier, and while this has it's limitations, it would provide a point of entry for beginners and make the learning curve for encryption and security more gentle.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The
key
can be a crypthographic RSA key generated with Crypto and CryptoKey class, but imho should not need to be.If this enhancement will not be used often, can it be worked around with a few lines of script?
Writing a decrypting and encrypting method for a string is not something anyone could do easily with a few lines.
Is there a reason why this should be core and not an add-on in the asset library?
It's a GDScript feature request.