Blowfish - on a string
-
Alright, it's pushed (won't show up in the API until I'm back on my Windows system though). You can create the RSA key pairs already in the Tools menu. Just make sure you don't save it as file, or HISE will think you are using its copy protection...
// You can create those with "Tools / Create RSA Key pair, then copy to clip board and paste it here" const var publicKey = "101,6e72f1e9720ba9f28c32034c61575948f919ec78d97ad0cecd539f798084e284d983c580db1d3fb72897535305df0bc61769825f18174a46c2d524b32138f80d"; // Obviously don't include that one in your shipped product... const var privateKey = "c0889eb9cdc6a2c5afa7dde7c29645f9ba332aa8d3c32a3fa7aaac6838afdc89a1b66da08b40f71c68797a4977b00c3c3a8dcf750adc9238b1c0a42c78a4b01,6e72f1e9720ba9f28c32034c61575948f919ec78d97ad0cecd539f798084e284d983c580db1d3fb72897535305df0bc61769825f18174a46c2d524b32138f80d"; const var dummyData = "1234abc" const var encrypted = FileSystem.encryptWithRSA(dummyData, privateKey); const var decrypted = FileSystem.decryptWithRSA(encrypted, publicKey); Console.print(encrypted); Console.print(decrypted);
-
@Christoph-Hart man you're quick...Thanks.
-
@Lindon Did you get this implemented yet?
-
@dustbro Paste the code into a script and find out :)
-
@Christoph-Hart I have no doubt that it works. I guess that was just opening a conversation to "how does it work?" Is there a flow chart or something I can look at? I have a key that I'd like to hide in my script, and this seems like a way to do it... I just don't know how it works. .
-
@dustbro depends what you mean by "hide" - read the "flow of control description" I wrote earlier...and it should be obvious.
RSA encryption/decryption allows you to hide one key, (the private key) and to use the public key(viewable) to decrypt the string
-
@ustk said in Blowfish - on a string:
@Lindon I've just added two methods:
https://github.com/christophhart/HISE/pull/331to use this way:
Did this ever get included in HISE? Its not working here...
-
@Lindon Christoph posted an example a few posts up.
-
@d-healey no, I'm looking for the simple blowfish stuff.... it doesnt seem to work anymore..
-
@Lindon Looks like that pull request hasn't been merged yet.
-
@d-healey -yeah I will use the write/read EncryptedObject then...
-
@Lindon Or wait a few minutes for @Christoph-Hart to merge it hopefully :D
You could also pull it into your own fork.
-
@d-healey said in Blowfish - on a string:
You could also pull it into your own fork.
Sometimes you make laugh out loud.....
-
@Lindon I've merged it.
-
@Christoph-Hart -too late-I'm down the encryptedObject path now - :beaming_face_with_smiling_eyes: