aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Cryptography
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-11-23 01:14:32 +0900
committerGitHub <noreply@github.com>2019-11-23 01:14:32 +0900
commit51cdc6ea166b6eae7f060ce05c74e83b34a94976 (patch)
treebc01564b696fb4bc323b547fdd03e2fe7893f93f /Emby.Server.Implementations/Cryptography
parent7b3c394a3e3df291a54811085dd0d32fc243f397 (diff)
parentd7335f6ae6c9cb2b5000ca9be9c8b7f6f268af2a (diff)
Merge pull request #1926 from Bond-009/auth
Add clearer exceptions, warnings and docs
Diffstat (limited to 'Emby.Server.Implementations/Cryptography')
-rw-r--r--Emby.Server.Implementations/Cryptography/CryptographyProvider.cs10
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)