コード例 #1
0
            public Encoder(Base32Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                _encoder = new Base32Encoder(settings);
            }
コード例 #2
0
        public Base32Codec(Base32Settings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            Settings = settings.ToReadOnly();
        }
コード例 #3
0
        public Base32Settings(Base32Settings inheritedSettings)
            : this(true)
        {
            if (inheritedSettings == null)
            {
                throw new ArgumentNullException(nameof(inheritedSettings));
            }

            InheritSettings(inheritedSettings);
        }
コード例 #4
0
            public Base32Decoder(Base32Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                // initialize all fields to default values..
                this = default;

                settings.GetDecoderSettings(
                    out _decodingTable,
                    out _decodingAffixTable,
                    out _decodingPrefixes,
                    out _decodingPostfixes,
                    out _flags
                    );

                Reset();
            }
コード例 #5
0
            public Base32Encoder(Base32Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                // initialize to defaults..
                this = default;

                settings.GetEncoderSettings(
                    out _alphabet,
                    out _flags,
                    out _lineSeparator,
                    out _maximumLineLength,
                    out _initialAffix,
                    out _finalAffix,
                    out _paddingChar
                    );

                Reset();
            }
コード例 #6
0
 public Decoder(Base32Settings settings)
 {
     _codecDecoder = new Base32Decoder(settings);
 }
コード例 #7
0
 private Base32Settings(Base32Settings inheritedSettings, bool isProtected)
     : this(inheritedSettings)
 {
     IsProtected = isProtected;
 }