Table of Contents

Class DpapiConnectionPasswordProtector

Namespace
ItTiger.TigerQuery.Core
Assembly
ItTiger.TigerQuery.Core.dll
Protects non-empty plain-text profile passwords with current-user Windows DPAPI.
public sealed class DpapiConnectionPasswordProtector : IConnectionPasswordProtector
Inheritance
DpapiConnectionPasswordProtector
Implements
Inherited Members

Remarks

DPAPI ciphertext is tied to the Windows user and is not portable to another user or platform. Decryption failure leaves PlainPassword unchanged rather than throwing.

Methods

ProtectForSave(SqlServerConnectionProfile)

Prepares a profile's password fields for JSON persistence.
public void ProtectForSave(SqlServerConnectionProfile profile)

Parameters

profile SqlServerConnectionProfile
The mutable profile about to be serialized.

Exceptions

ArgumentNullException
profile is null.
PlatformNotSupportedException
A non-empty plain password is supplied on a platform without Windows DPAPI.

UnprotectAfterLoad(SqlServerConnectionProfile)

Restores usable in-memory password fields after JSON deserialization.
public void UnprotectAfterLoad(SqlServerConnectionProfile profile)

Parameters

profile SqlServerConnectionProfile
The mutable profile that was loaded.

Exceptions

ArgumentNullException
profile is null.