User Tools

Site Tools


en:orx:config:encryption

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:orx:config:encryption [2009/10/02 05:51 (13 years ago)]
iarwain
en:orx:config:encryption [2017/05/30 00:50 (5 years ago)] (current)
Line 18: Line 18:
 @[email protected] @[email protected]
  
-; Finally we put all the settings that we don't want to end user to mess up with+; Finally we include the file containing ​all the settings that we don't want to end user to mess up with
 ; If the end-user did provide values for them, they'​ll be overidden here anyway ; If the end-user did provide values for them, they'​ll be overidden here anyway
-[...]</​code>​+@crypted.[email protected]</​code>​
  
 In the same way, we can add included files for customized inputs, for example. We would add it just after the inclusion of config.ini.\\ In the same way, we can add included files for customized inputs, for example. We would add it just after the inclusion of config.ini.\\
Line 40: Line 40:
  
 ; Non-overridable config stuff (ie. everything else) ; Non-overridable config stuff (ie. everything else)
-[...]</​code>​+@crypted.[email protected]</​code>​
  
 And, of course, you might not want the end-user to mess up with this file, so we now need to encrypt it when releasing our game. And, of course, you might not want the end-user to mess up with this file, so we now need to encrypt it when releasing our game.
- 
- 
 ===== Encryption ===== ===== Encryption =====
  
Line 51: Line 49:
 Well, now that we've said that, let's see how we can use it! =) Well, now that we've said that, let's see how we can use it! =)
  
-First of all, we need an encryption key (or pass phrase). The longer, the better. If you don't provide any, orx's default one will be used, so you might want to change it for one of yours so that others ​can (too easily) decrypt your stuff. ;-)+First of all, we need an encryption key (or pass phrase). The longer, the better. If you don't provide any, orx's default one will be used, so you might want to change it for one of yours so that others ​could not (too easily) decrypt your stuff. ;-)
  
 To set the encryption key, you need to call: To set the encryption key, you need to call:
Line 57: Line 55:
 <code c>​orxConfig_SetEncryptionKey("​MyVeryLongEncryptionKey"​);</​code>​ <code c>​orxConfig_SetEncryptionKey("​MyVeryLongEncryptionKey"​);</​code>​
  
-Of course, as orx will load its main config file it is initialized,​ you need to issue the call to ''​orxConfig_SetEncryptionKey()''​ before initializing orx. It would look something like this:+Of course, as orx will load its main config file **when** ​it is initialized,​ you need to issue the call to ''​orxConfig_SetEncryptionKey()''​ before initializing orx. It would look something like this:
  
 <code c>int main(int argc, char **argv) <code c>int main(int argc, char **argv)
Line 80: Line 78:
 It can be used to merge multiple config files into a single one and perform encryption/​decryption if requested. It can be used to merge multiple config files into a single one and perform encryption/​decryption if requested.
  
-WIP =)+orxCrypt accepts a number of command line parameters:​ 
 +  * [MANDATORY] a list of input files 
 +  * [OPTIONAL] ​ a name for the merged output file 
 +  * [OPTIONAL] ​ a key for encryption/​decryption 
 +  * [OPTIONAL] ​ a switch to save output in a non-encrypted way (by default output'​ll be encrypted) 
 + 
 +Here's its syntax: 
 + 
 +<code dos>​orxcrypt -f InputFile [+ ...] [-o OutputFile] [-k EncryptionKey] [-d]</​code>​ 
 + 
 +You can display its help with 
 + 
 +<code dos>​orxcrypt -h</​code>​ 
 + 
 +For any parameter, help can be diplayed using its long name: 
 + 
 +<code dos>​orxcrypt -h ParameterLongName</​code>​ 
 + 
 +Let's now see the parameters in details. 
 + 
 +==== Input file list ==== 
 + 
 +**-f / ''​-''''​-''​filelist** 
 + 
 +The file list is mandatory. At least one file has to be provided and multiple files have to be separated by spaces. Unfortunately input files can't include spaces for now. 
 + 
 +Syntax: 
 + 
 +<code dos>-f InputFile1 [InputFile2 ... InputFileN]</​code>​ 
 + 
 +If input files are encrypted with a user-provided key, you need to pass it to orxcrypt using its [[#​Encryption key|encryption key parameter]]. 
 + 
 +==== Encryption key ==== 
 + 
 +**-k / ''​-''''​-''​key** 
 + 
 +The encryption key parameter is optional. If it isn't provided, orx's default one will be used. The key is used for both decryption and encryption. OrxCrypt will figure by itself if your input files are encrypted or not. 
 + 
 +Syntax: 
 + 
 +<code dos>-k EncryptionKey</​code>​ 
 + 
 +//NB: If your encryption key contains spaces, you won't be able to provide it via the command line. In this case, you'll have to provide it through orxCrypt'​s config file (//​orxcrypt.ini//​)://​ 
 + 
 +<code ini>​[Param] 
 +key = My encryption key contains spaces and can be provided here 
 +</​code>​ 
 + 
 +==== Output file ==== 
 + 
 +**-o / ''​-''''​-''​output** 
 + 
 +The output parameter is optional. If none is provided, the merged output will be stored in ''​orxcrypt.out''​. 
 + 
 +Syntax: 
 + 
 +<code dos>-o OutputFile</​code>​ 
 + 
 +==== Decryption ==== 
 + 
 +**-d / ''​-''''​-''​decrypt** 
 + 
 +By default orxCrypt will encrypt the merged file, either by using the encryption key the user provided or by orx's default one.\\ 
 +However, if you want the output to be stored in a human readable format (ie. non-encrypted), you'll have to provide this parameter. 
 + 
 +//NB: You can still provide a custom encryption key if one or many of your input files are encrypted with that key.// 
 + 
 +Syntax: 
 + 
 +<code dos>​-d</​code>​
en/orx/config/encryption.1254487903.txt.gz · Last modified: 2017/05/30 00:50 (5 years ago) (external edit)