public override void Decode(Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) { var tag = new Asn1Tag(); buffer.Mark(); var num = buffer.DecodeTagAndLength(tag); if (tag.Equals(0, 0, NullTypeCode)) { buffer.Reset(); var element = new NullParams(); SetElement(Null, element); Element.Decode(buffer, true, num); } else { if (!tag.Equals(0, 0x20, SequenceTypeCode)) { throw ExceptionUtility.CryptographicException(Resources.Asn1InvalidChoiceOptionTagException, tag, buffer.ByteCount); } buffer.Reset(); var parameters = new GostR34102001PublicKeyParameters(); SetElement(Params, parameters); Element.Decode(buffer, true, num); } }
public override void Decode(Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) { var tag = new Asn1Tag(); buffer.Mark(); var num = buffer.DecodeTagAndLength(tag); if (tag.Equals(0, 0, NullTypeCode)) { buffer.Reset(); var element = new NullParams(); SetElement(Null, element); Element.Decode(buffer, true, num); } else { if (!tag.Equals(0, 0x20, SequenceTypeCode)) { throw ExceptionUtility.CryptographicException(Resources.Asn1InvalidChoiceOptionTagException, tag, buffer.ByteCount); } buffer.Reset(); var parameters = new GostR341094PublicKeyParameters(); SetElement(Params, parameters); Element.Decode(buffer, true, num); } }
public void Equivalent_ReturnsFalse_ForNullCollections(NullParams @params) { var first = @params == NullParams.First || @params == NullParams.Both ? null : _one; var second = @params == NullParams.Second || @params == NullParams.Both ? null : _one; Assert.False(first.Equivalent(second)); }
public void ArraysEqual_ReturnsNull_ForNullArrays(NullParams @params) { var first = @params == NullParams.First || @params == NullParams.Both ? null : _one.ToArray(); var second = @params == NullParams.Second || @params == NullParams.Both ? null : _one.ToArray(); Assert.False(first.ArraysEqual(second)); }
public FlatComponentVisitor(NullParams @params) : base(@params) { }
public RemoveConditionVisitor(NullParams @params) : base(@params) { }