Пример #1
0
        public void Setup()
        {
            IShaFactory  shaFactory  = new NativeShaFactory();
            IHmacFactory hmacFactory = new HmacFactory(shaFactory);
            IKmacFactory kmacFactory = new KmacFactory(new CSHAKEWrapper());
            ICmacFactory cmacFactory = new CmacFactory(new BlockCipherEngineFactory(), new ModeBlockCipherFactory());

            _kdfVisitor = new KdfVisitor(
                new KdfOneStepFactory(shaFactory, hmacFactory, kmacFactory),
                new KdfFactory(cmacFactory, hmacFactory),
                hmacFactory,
                cmacFactory,
                new IkeV1Factory(hmacFactory, shaFactory),
                new IkeV2Factory(hmacFactory),
                new TlsKdfFactory(hmacFactory),
                new HkdfFactory(hmacFactory));

            _kdfMultiExpansionVisitor = new KdfMultiExpansionVisitor(
                new KdfFactory(cmacFactory, hmacFactory), new HkdfFactory(hmacFactory), cmacFactory, hmacFactory);
        }
Пример #2
0
 public KdfMutliExpansion(IKdfMultiExpansionVisitor visitor)
 {
     _visitor = visitor;
 }
 public KdfMultiExpansionResult AcceptKdf(IKdfMultiExpansionVisitor visitor)
 {
     return(visitor.Kdf(this));
 }