public X501AttributeAsn(X501Attribute attribute) { if (attribute == null) { throw new ArgumentNullException(nameof(attribute)); } AttrId = attribute.Oid; AttrValues = new[] { new ReadOnlyMemory <byte>(attribute.RawData) }; }
public X501AttributeAsn(X501Attribute attribute, bool copyValue = true) { if (attribute == null) { throw new ArgumentNullException(nameof(attribute)); } AttrId = attribute.Oid.Value; AttrValues = new[] { new AttributeValueAsn { AttrValue = copyValue ? attribute.RawData.CloneByteArray() : attribute.RawData } }; }