Exemplo n.º 1
0
        public void WhenTheContextStringForAProtocolContextIsGenerated()
        {
            const CipherSuiteName  cipherSuiteName = CipherSuiteName.Ristretto255_SHA512;
            PrimeOrderGroupFactory pogFactory      = new();
            HashFunctionFactory    hfFactory       = new();

            _cipherSuite = new CipherSuite(cipherSuiteName, pogFactory, hfFactory);

            _actualContextString   = _cipherSuite.ProtocolContextString.ToArray();
            _expectedContextString = new byte[] { 0, 0, (byte)cipherSuiteName }; // Mode 0, Cipher 0x0004
        }
Exemplo n.º 2
0
 public IPrimeOrderGroup Create(CipherSuiteName cipherSuiteName, ICipherSuite cipherSuite)
 => cipherSuiteName switch
 {
Exemplo n.º 3
0
 public IHashFunction Create(CipherSuiteName cipherSuiteName, ICipherSuite cipherSuite)
 => cipherSuiteName switch
 {