Extend CryptoRngProvider api

This commit is contained in:
Alexandru Macocian
2021-07-15 16:32:40 +03:00
parent a2d23ed716
commit ce3cac9fa2
4 changed files with 31 additions and 1 deletions
@@ -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);
}
}
}