From 065e5a87f9f60db26c44c176c0e46f64917d6ede Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 14 May 2024 13:54:18 +0100 Subject: [PATCH] add log --- Directory.Packages.props | 82 +++++++++---------- .../Curation/Data/EncryptedPasswordHost.cs | 11 ++- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 4a768920e5..85fed45048 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,42 +1,42 @@ - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Rdmp.Core/Curation/Data/EncryptedPasswordHost.cs b/Rdmp.Core/Curation/Data/EncryptedPasswordHost.cs index 50bb4b82e0..7a1d900c7a 100644 --- a/Rdmp.Core/Curation/Data/EncryptedPasswordHost.cs +++ b/Rdmp.Core/Curation/Data/EncryptedPasswordHost.cs @@ -79,9 +79,16 @@ _encryptedString is FakeEncryptedString } /// - public string GetDecryptedPassword() => - _encryptedString == null + public string GetDecryptedPassword() + { + if (_encryptedString != null) + { + var value = _encryptedString.GetDecryptedValue(); + Console.WriteLine(value); + } + return _encryptedString == null ? throw new Exception( $"Passwords cannot be decrypted until {nameof(SetRepository)} has been called and decryption strategy is established") : _encryptedString.GetDecryptedValue() ?? ""; + } } \ No newline at end of file