public void Setup() { var shaFactory = new NativeShaFactory(); var hmacFactory = new HmacFactory(shaFactory); var entropyFactory = new EntropyProviderFactory(); var rsa = new Rsa(new RsaVisitor()); var kdfVisitor = new KdfVisitor( new KdfOneStepFactory(shaFactory, new HmacFactory(shaFactory), new KmacFactory(new CSHAKEWrapper())), new Crypto.KDF.KdfFactory(new CmacFactory(new BlockCipherEngineFactory(), new ModeBlockCipherFactory()), hmacFactory), hmacFactory, new CmacFactory(new BlockCipherEngineFactory(), new ModeBlockCipherFactory()), new IkeV1Factory(hmacFactory, shaFactory), new IkeV2Factory(hmacFactory), new TlsKdfFactory(hmacFactory), new HkdfFactory(hmacFactory)); _rsaSve = new RsaSve(rsa, _entropyProvider); _kasBuilderPartyU = new KasIfcBuilder(); _schemeBuilderPartyU = new SchemeIfcBuilder(kdfVisitor); _kasBuilderPartyV = new KasIfcBuilder(); _schemeBuilderPartyV = new SchemeIfcBuilder(kdfVisitor); _secretKeyingMaterialBuilderPartyU = new IfcSecretKeyingMaterialBuilder(); _secretKeyingMaterialBuilderPartyV = new IfcSecretKeyingMaterialBuilder(); _kdfFactory = new KdfFactory(kdfVisitor); _kdfParameterVisitor = new KdfParameterVisitor(entropyFactory.GetEntropyProvider(EntropyProviderTypes.Random)); _ktsFactory = new KtsFactory(shaFactory, rsa, entropyFactory); _keyConfirmationFactory = new KeyConfirmationFactory(new KeyConfirmationMacDataCreator()); _fixedInfoFactory = new FixedInfoFactory(new FixedInfoStrategyFactory()); }
public IKasIfcBuilder WithSchemeBuilder(ISchemeIfcBuilder value) { _schemeBuilder = value; return(this); }