Hello,
Would it be possible to get some sample of how to encrypt/decrypt a SSH privatekey, store it in the DFM file and use it with sshclient? The point is to make it hard or better impossible for the end user to get they key, only to use the key when running the EXE. My experience with encryption and components is limited.
Best Regards, Pär
Roadmap needed
Re: Roadmap needed
SecureBridge doesn't allow saving keys to a DFM file.
To solve your task, you can store your key, for example, in a text mode in your application and use the TScMemoryStorage component. The TScMemoryStorage component is designed to store certificates and keys only in the RAM of the device. For this reason, certificates and keys are stored in the local memory of the running application at runtime, while at design-time, they are stored in the local memory only when you work in the TScMemoryStorage property editor: if you close the project, the keys will be removed. You'll need to import the keys again after reopening the project.
To use keys in your application with the TScMemoryStorage component, load them each time you run the application, even if you previously loaded the keys at design-time.
Also, you can store information about keys and users in files using the TScFileStorage component. If you enabled the properties TScFileStorage.Algorithm and TScFileStorage.Password, private keys will be stored in an encrypted form. These properties are used to encode and decode files when saving or loading data.
To solve your task, you can store your key, for example, in a text mode in your application and use the TScMemoryStorage component. The TScMemoryStorage component is designed to store certificates and keys only in the RAM of the device. For this reason, certificates and keys are stored in the local memory of the running application at runtime, while at design-time, they are stored in the local memory only when you work in the TScMemoryStorage property editor: if you close the project, the keys will be removed. You'll need to import the keys again after reopening the project.
To use keys in your application with the TScMemoryStorage component, load them each time you run the application, even if you previously loaded the keys at design-time.
Also, you can store information about keys and users in files using the TScFileStorage component. If you enabled the properties TScFileStorage.Algorithm and TScFileStorage.Password, private keys will be stored in an encrypted form. These properties are used to encode and decode files when saving or loading data.