Exemplo n.º 1
0
        public void SignAndVerify(byte[] data, byte[] keybytes)
        {
            var key = new Key(keybytes);

            Poly1305.Sign(data, 0, data.Length, in key, out Mac mac);
            Assert.True(Poly1305.Verify(data, 0, data.Length, key, in mac));
        }
Exemplo n.º 2
0
        public void SignTestVectors(string name, byte[] data, byte[] keybytes, byte[] expected)
        {
            var key = new Key(keybytes);

            Poly1305.Sign(data, 0, data.Length, in key, out Mac actual);
            Assert.Equal(new Mac(expected), actual);
        }