Tag: jse
Read a file into a byte array
by ricardoz on Jul.22, 2008, under Tips
Need to read a file into a byte array in memory, here’s a simple code sample.
(continue reading…)
Encrypting sensitive information in persistent media
by ricardoz on Apr.06, 2008, under Articles, Security
If you ever deployed an application in a corporate environment, where an IT Security officer likes to keep a tight leash on who knows each system password, you probably needed to figure out some sort of security mechanism to store the passwords your application needs to connect to some database, access a web service, etc.
The most obvious and straightforward approach is to use a symmetric algorithm, like 3DES or AES, with an encryption password hard coded in your application to decrypt/encrypt the sensitive credentials. This has several cons:
- Anyone with access to the source code of the application can decrypt all sensitive data, ie you can’t guarantee the security officer that someone from your team/company won’t abuse this
- Anyone with access to the binary files of the application and a good de-compiler can decrypt all sensitive data, ie the security officer can’t even trust his IT production staff
- To change the encryption password you have to re-deploy the application
And these are just the 3 most important issues that come to mind in 5 minutes…