We have fields that store the username and the password which used to connect to DB2 using JDBC.
For security, I have set the the password field type as “Password”, then it will show the “*” when we input the actual password into the document. However, the user also can see the actual password in the document properties, which violate our security rule.
I have tried to encypt the password by the code IsEncrypted, but then can not connect to DB2 using JDBC which use Java to get the password, like this:
Subject: Encrypt password and decrypt the password with Java
You have three requirements:- Your code needs to be to encrypt and decrypt the password
The user must be able to edit the password.
Users must not be able to see the passwords
You cannot solve this with Notes’ builtin encryption.
(Note: if a user is allowed to see his own password, but is not allowed to see other user’s passwords, that’s a different case. That case can be solved with ReaderNames fields.)
You will need to use the Java crypto APIs. Your code will have a secret key built into it. (You will have to protect your source code to make sure that the key stays private!) There are many tutorials, references, and examples for the Java crypto APIs on the web. Here is one example:
Subject: RE: Encrypt password and decrypt the password with Java
Thanks a lot Rich!But my notes designer is V6.02 which can not use some java class, just like javax.crypto.Cipher, javax.crypto.SecretKey, javax.crypto.SecretKeyFactory, javax.crypto.spec.PBEKeySpec, javax.crypto.spec.PBEParameterSpec.