2015-05-13 17:11:55 +00:00
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
|
using xClient.Core.Encryption;
|
|
|
|
|
using xClient.Core.Helper;
|
|
|
|
|
|
2015-05-13 17:17:00 +00:00
|
|
|
|
namespace xClient.Tests.Core.Encryption
|
2015-05-13 17:11:55 +00:00
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class SHA256Tests
|
|
|
|
|
{
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void ComputeHashTest()
|
|
|
|
|
{
|
|
|
|
|
var input = Helper.GetRandomName(100);
|
|
|
|
|
var result = SHA256.ComputeHash(input);
|
|
|
|
|
|
|
|
|
|
Assert.IsNotNull(result);
|
|
|
|
|
Assert.AreNotEqual(result, input);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|