WalletPassword
This property stores the password to decrypt the PKCS #12 wallet.
Declaration
// C# public static OracleOpaqueString WalletPassword {get; set;}
Property Value
The password to decrypt the encrypted PKCS #12 wallet.
Remarks
Wallet passwords support the same functionality as traditional ODP.NET passwords.
Since PKCS #12 files are encrypted, apps must provide the wallet password as an OracleOpaqueString
. When the wallet password is provided through the OracleConfiguration.WalletPassword
or the OracleConnection.WalletPassword
class property, ODP.NET loads the associated PKCS #12 file as designated by the wallet location. Alternately, if no password is provided, then ODP.NET loads the associated SSO file.
Changing the WalletPassword
for an existing connection pool does not create a new pool. Only setting the property or unsetting it creates a new pool.
Note:
The OracleConfiguration.WalletPassword
is associated with the OracleConfiguration.WalletLocation
and the OracleConnection.WalletPassword
is associated with the OracleConnection.WalletLocation
.
Example
//Create OracleOpaqueString for wallet password string walletPassword = "<WALLET PASSWORD>"; OracleOpaqueString opaPwd = new OracleOpaqueString(); foreach (char c in walletPassword) opaPwd.AppendChar(c); opaPwd.MakeReadOnly(); //Create and open connection OracleConnection conn = new OracleConnection("user id=HR; password=<PASSWORD>"); conn.WalletLocation = "C:\wallet\location\"; conn.WalletPassword = opaPwd; conn.Open();