コード例 #1
0
        /// <summary>
        /// Prepares the Builder ready for use. This must be called before your first call to the <see cref="Run"/> method.
        /// This method is idempotent.
        /// </summary>
        /// <returns>the same Builder instance</returns>
        public AddAesEntryBuilder Build()
        {
            Contract.Ensures(Contract.Result <AddAesEntryBuilder>() != null);
            //
            var encryptWorkflow = new EncryptWorkflow <AesKey, KeyFromFileDetails>(
                _keyLoader,
                new AesKeySuitabilityChecker(),
                new Utf16LittleEndianUserStringConverter(),
                new AesSegmentEncryptionAlgo(new AesAlgo()));

            _workflow = new AddEntryUsingKeyFileWorkflow <AesKey, AddEntryUsingKeyFileWorkflowOptions>(encryptWorkflow, _datLoader, _datSaver);
            IsBuilt   = true;
            return(this);
        }
コード例 #2
0
 protected override void SetWorkflowToNull()
 {
     _workflow = null;
 }