I understand that rbs encrypted files are very easily cracked, and because of that the RBE encryption was introduced in 2017. I also understand that in order to prevent the RBE encryption from being cracked the encryption is done after the extension is submitted. Obviously there is no tool available that developers can use to encrypt the files themselves, because then someone could create a tool to also decrypt the files.
If I want to build an installer for my extension that includes RBE files, how can I do that? Must I submit my extension first, then download it after it goes live, just so I can get the RBE files needed to create my installer? Or is there a way that I can submit my extension, and request encryption without having it go live in the warehouse? Previously I simply published my installer using rbs files, that I could make myself.
At its simplest an RBZ submitted for signing/encryption needs an RB file which âsets upâ the extension [or it could even be some basic Ruby code] AND a subfolder of the exact same name.
In your example youâve put the RB in the subfolder, so itâs doomed to failureâŚ
Move the RB & second nested subfolder into the RBZ and delete the extra subfolderâŚ
In the RB fileâs code you reference a âLoaderâ file in the main subfolder thatâs missing - itâs inside the nested subfolder.
Usually this RB is where the bones of the Ruby script goâŚ
That nested file must be submitted as an RB and it will be returned in the RBZ back to you with it as is, or encrypted as an RBE - as you choose when submitting.
Once its successfully signed a special âsusigâ file is also added into the subfolder, used in checking the extensionâs validity as it loadsâŚ
Obviously an extension can be more complex that outlined here - e.g. several RB files ârequiredâ by the Loader, image-files, html etc etcâŚ
PS: You also need to have a extra layer of module nesting - e.g. your top-level name-space module AND then your toolâs own module within that - this omission will not break the RBZ processing, but is best practiceâŚ
Next question. How can I automate that? With the rbs scrambler there was a windows exe that could be downloaded. That allowed me to automate the encryption as part of the build process, when the installer was created.