move classes to portable server lib

This commit is contained in:
Luke Pulverenti
2016-11-03 03:14:14 -04:00
parent 3eb4091808
commit b76a1abda5
18 changed files with 81 additions and 68 deletions

View File

@@ -19,6 +19,15 @@ namespace Emby.Common.Implementations.Cryptography
return provider.ComputeHash(Encoding.Unicode.GetBytes(str));
}
}
public byte[] GetSHA1Bytes(byte[] bytes)
{
using (var provider = SHA1.Create())
{
return provider.ComputeHash(bytes);
}
}
public byte[] GetMD5Bytes(Stream str)
{
using (var provider = MD5.Create())