Beispiel #1
0
            public void WhenHashAlgorithmIsNotSupported_ThrowsNotSupportedException()
            {
                var    sut = new RSASignatureAlgorithm(new HashAlgorithmName("unsupporteed"), _rsa);
                Action act = () => sut.ComputeHash("payload");

                act.Should().Throw <NotSupportedException>();
            }
Beispiel #2
0
            public void CreatesHash()
            {
                var sut     = new RSASignatureAlgorithm(HashAlgorithmName.SHA384, _rsa);
                var payload = "_abc_123_";
                var actual  = sut.ComputeHash(payload);

                actual.Should().NotBeNull().And.NotBeEmpty();
            }