I am currently storing the user password in a SecureString
. Which is also kept around in case the connection to the DB resets.
My problem is, I'm trying to pass this password to an OracleParamater
, but I'm not sure if it supports it or not.
Does Oracle's Oracle.DataAccess
dll support SecureString
or BStr
? Since If I have to convert it to a string then that would kinda defeat the purpose of SecureString
.
--- EDIT
I know that SecureString
is about reducing the attack surface by keeping as few copies of the password around unencrypted as possible. The problem is at some point you ofcourse have to decrypt the password to use it. If I could pass a char[]
or a BStr
or the secure string itself in an OracleParameter
then I could clear it after the call returns. But If I have to create a string in order to pass it to Oracle, then I've just created a new immutable copy of the password. So I'm not really sure I gained much then.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…