/** * Creates a new oid type. * * @param item to DER encode */ public OidType(final int[] item) { super(UniversalDERTag.OID); derItem = toBytes(item); }
/** * Creates a new oid type. * * @param item to DER encode */ public OidType(final int[] item) { super(UniversalDERTag.OID); derItem = toBytes(item); }
/** * Creates a new oid type. * * @param item to DER encode */ public OidType(final int[] item) { super(UniversalDERTag.OID); derItem = toBytes(item); }
/** * Creates a new oid type. * * @param item to DER encode */ public OidType(final String item) { super(UniversalDERTag.OID); derItem = toBytes(parse(item)); }
/** * Creates a new oid type. * * @param item to DER encode */ public OidType(final String item) { super(UniversalDERTag.OID); derItem = toBytes(parse(item)); }
/** * Creates a new oid type. * * @param item to DER encode */ public OidType(final String item) { super(UniversalDERTag.OID); derItem = toBytes(parse(item)); }
/** * Creates a new oid type. * * @param tag der tag associated with this type * @param item to DER encode * * @throws IllegalArgumentException if the der tag is constructed */ public OidType(final DERTag tag, final int[] item) { super(tag); if (tag.isConstructed()) { throw new IllegalArgumentException("DER tag must not be constructed"); } derItem = toBytes(item); }
/** * Creates a new oid type. * * @param tag der tag associated with this type * @param item to DER encode * * @throws IllegalArgumentException if the der tag is constructed */ public OidType(final DERTag tag, final int[] item) { super(tag); if (tag.isConstructed()) { throw new IllegalArgumentException("DER tag must not be constructed"); } derItem = toBytes(item); }
/** * Creates a new oid type. * * @param tag der tag associated with this type * @param item to DER encode * * @throws IllegalArgumentException if the der tag is constructed */ public OidType(final DERTag tag, final int[] item) { super(tag); if (tag.isConstructed()) { throw new IllegalArgumentException("DER tag must not be constructed"); } derItem = toBytes(item); }
/** * Creates a new oid type. * * @param tag der tag associated with this type * @param item to DER encode * * @throws IllegalArgumentException if the der tag is constructed */ public OidType(final DERTag tag, final String item) { super(tag); if (tag.isConstructed()) { throw new IllegalArgumentException("DER tag must not be constructed"); } derItem = toBytes(parse(item)); }
/** * Creates a new oid type. * * @param tag der tag associated with this type * @param item to DER encode * * @throws IllegalArgumentException if the der tag is constructed */ public OidType(final DERTag tag, final String item) { super(tag); if (tag.isConstructed()) { throw new IllegalArgumentException("DER tag must not be constructed"); } derItem = toBytes(parse(item)); }
/** * Creates a new oid type. * * @param tag der tag associated with this type * @param item to DER encode * * @throws IllegalArgumentException if the der tag is constructed */ public OidType(final DERTag tag, final String item) { super(tag); if (tag.isConstructed()) { throw new IllegalArgumentException("DER tag must not be constructed"); } derItem = toBytes(parse(item)); }
/** * @param expected bytes to compare. * @param oid to encode. * * @throws Exception On test failure. */ @Test(groups = {"asn1"}, dataProvider = "oids") public void encode(final byte[] expected, final String oid) throws Exception { Assert.assertEquals(OidType.toBytes(OidType.parse(oid)), expected); }