示例#1
0
  public static CRT decode(CRTType type, TLVList data) {
    ConstructedTLV crtTLV = (ConstructedTLV) data.getByTag(type.getTag());
    TLV uqTLV = crtTLV.getContents().getByTag(TAG_UQ);

    return new CRT(
        type,
        UsageQualifier.decode(uqTLV.getData()[0]),
        CRTKeyRef.decode(crtTLV.getContents().getByTag(TAG_KEYREF).getData()));
  }
示例#2
0
 public TLV encodeKeyReference() {
   PrimitiveTLV tlv = new PrimitiveTLV(TAG_KEYREF);
   if (keyRef != null) tlv.setData(keyRef.encode());
   return tlv;
 }