diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-10-20 21:12:03 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-10-20 21:12:03 +0200 |
| commit | fef35d0505c6485954b1eb233a5ea67e33fe1138 (patch) | |
| tree | 13c53aa1a6e295196ac935ea21e0c0dcc56f128c /Emby.Server.Implementations/Cryptography | |
| parent | fdb0c3a1dff0c1e9c3c22a3be688b97ea0bd7a6d (diff) | |
Add clearer exceptions, warnings and docs
Diffstat (limited to 'Emby.Server.Implementations/Cryptography')
| -rw-r--r-- | Emby.Server.Implementations/Cryptography/CryptographyProvider.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs b/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs index 23b77e268..fec7d161e 100644 --- a/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs +++ b/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs @@ -30,6 +30,9 @@ namespace Emby.Server.Implementations.Cryptography private bool _disposed = false; + /// <summary> + /// Initializes a new instance of the <see cref="CryptographyProvider"/> class. + /// </summary> public CryptographyProvider() { // FIXME: When we get DotNet Standard 2.1 we need to revisit how we do the crypto @@ -59,12 +62,6 @@ namespace Emby.Server.Implementations.Cryptography throw new CryptographicException($"Cannot currently use PBKDF2 with requested hash method: {method}"); } - public byte[] ComputeHash(string hashMethod, byte[] bytes) - => ComputeHash(hashMethod, bytes, Array.Empty<byte>()); - - public byte[] ComputeHashWithDefaultMethod(byte[] bytes) - => ComputeHash(DefaultHashMethod, bytes); - public byte[] ComputeHash(string hashMethod, byte[] bytes, byte[] salt) { if (hashMethod == DefaultHashMethod) @@ -90,7 +87,6 @@ namespace Emby.Server.Implementations.Cryptography } throw new CryptographicException($"Requested hash method is not supported: {hashMethod}"); - } public byte[] ComputeHashWithDefaultMethod(byte[] bytes, byte[] salt) |
