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