/// <summary> /// If variable striping mode is enabled, advances the state of the selection CSPRNG, /// and returns the output to be used as the length of the next operation. /// Otherwise, fixed length is returned. /// </summary> /// <returns>Operation length to perform.</returns> private int NextOperationLength() { int operationLength = _stripeMode == FabricStripeMode.VariableLength ? EntropySource.Next(_minStripe, _maxStripe) : _maxStripe; Debug.Print(DebugUtility.CreateReportString("FabricPayloadMux", "NextOperationLength", "Generated stripe length value", operationLength)); return(operationLength); }
private int NextPaddingLength() { int paddingLength = (_paddingMode == FrameshiftPaddingMode.VariableLength) ? EntropySource.NextPositive(_minPadding, _maxPadding) : _maxPadding; Debug.Print(DebugUtility.CreateReportString("FrameshiftPayloadMux", "NextPaddingLength", "Generated length value", paddingLength)); return(paddingLength); }