mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-22 17:19:30 +00:00
Extend CryptoRngProvider api
This commit is contained in:
@@ -35,5 +35,21 @@ namespace SystemExtensions.NetStandard.Security.Tests
|
||||
|
||||
bytes.All(b => b != 0).Should().BeTrue();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetBytes_ShouldReturnBytes()
|
||||
{
|
||||
var bytes = this.cryptoRngProvider.GetBytes(10);
|
||||
|
||||
bytes.Length.Should().Be(10);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetNonZeroBytes_ShouldReturnBytes()
|
||||
{
|
||||
var bytes = this.cryptoRngProvider.GetNonZeroBytes(10);
|
||||
|
||||
bytes.Length.Should().Be(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user