Exemplo n.º 1
0
        public void Test(string keyHex, string ivHex, string hex0, string hex1, string hex2, string hex3)
        {
            var key = keyHex.FromHex();
            var iv  = ivHex.FromHex();

            Test(new BcSalsa20Crypto(key, iv), hex0, hex1, hex2, hex3);
            Test(new Salsa20CryptoSF(key, iv), hex0, hex1, hex2, hex3);
            Test(new Salsa20CryptoX86(key, iv), hex0, hex1, hex2, hex3);
            Test(StreamCryptoCreate.Salsa20(key, iv), hex0, hex1, hex2, hex3);
        }
Exemplo n.º 2
0
 protected override IStreamCrypto CreateCrypto(bool isEncrypt, ReadOnlySpan <byte> key, ReadOnlySpan <byte> iv)
 {
     return(StreamCryptoCreate.Salsa20(key, iv));
 }