public void WhenCreateHmacSignatureWithAnyBytes_ThenReturnsSignature() { var result = Encoding.UTF8.GetBytes("abody").CreateHmacSignature("asecret"); Assert.That(result, Does.Match("[sha1\\=]".Fmt(DataFormats.Base64Text().Expression))); }
public void WhenCreateHmacSignatureWithEmptyBytes_ThenReturnsSignature() { var result = new byte[] {}.CreateHmacSignature("asecret"); Assert.That(result, Does.Match("[sha1\\=]".Fmt(DataFormats.Base64Text().Expression))); }