public DERObject getDERObject()
    {
        if (seq == null)
        {
            ASN1EncodableVector  vec = new ASN1EncodableVector();

            for (int i = 0; i != ordering.size(); i++)
            {
                ASN1EncodableVector     v = new ASN1EncodableVector();
                DERObjectIdentifier     oid = (DERObjectIdentifier)ordering.elementAt(i);

                v.add(oid);

                String  str = (String)values.elementAt(i);

				if (str.charAt(0) == '#')
				{
					str = str.toLowerCase();
					byte[]	data = new byte[str.length() / 2];
					for (int index = 0; index != data.length; index++)
					{
						char	left = str.charAt((index * 2) + 1);
						char right = str.charAt((index * 2) + 2);

						if (left < 'a')
						{
							data[index] = (byte)((left - '0') << 4);
						}
						else
						{
							data[index] = (byte)((left - 'a' + 10) << 4);
						}
						if (right < 'a')
						{
							data[index] |= (byte)(right - '0');
						}
						else
						{
							data[index] |= (byte)(right - 'a' + 10);
						}
					}

					ASN1InputStream aIn = new ASN1InputStream(
														new ByteArrayInputStream(data));

					try
                    {
                        v.add(aIn.readObject());
                    }
                    catch (IOException e)
                    {
                        throw new RuntimeException("bad object in '#' string");
                    }
				}
				else
				{
	                if (oid.equals(EmailAddress))
	                {
	                    v.add(new DERIA5String(str));
	                }
	                else
	                {
	                    if (canBePrintable(str))
	                    {
	                        v.add(new DERPrintableString(str));
	                    }
	                    else
	                    {
	                        v.add(new DERUTF8String(str));
	                    }
	                }
				}

                vec.add(new DERSet(new DERSequence(v)));
            }

            seq = new DERSequence(vec);
        }

        return seq;
    }