def decode_tst(tst_bytes): """ Decodes Timestamp Token """ tst = TSTInfo() decoded = decode(tst_bytes, asn1Spec=tst) tst = decoded[0] return tst
def decode_qts(qts_bytes): """ Decodes qualified timestamp """ qts = Qts() decoded = decode(qts_bytes, asn1Spec=qts) qts = decoded[0] return qts
def decode_qts(qts_bytes): ''' Decodes qualified timestamp ''' qts = Qts() decoded = decode(qts_bytes, asn1Spec=qts) qts = decoded[0] return qts
def decode_tst(tst_bytes): ''' Decodes Timestamp Token ''' tst = TSTInfo() decoded = decode(tst_bytes, asn1Spec=tst) tst = decoded[0] return tst
def decode_msg(message): """ Decodes message in DER encoding. Returns ASN1 message object """ # create template for decoder msg = Message() # decode pkcs signed message mess_obj = StringIO(message) mess_view = StringView(mess_obj, 0, len(message)) decoded = decode(mess_view, asn1Spec=msg) message = decoded[0] return message
def decode_msg(message): ''' Decodes message in DER encoding. Returns ASN1 message object ''' # create template for decoder msg = Message() # decode pkcs signed message mess_obj = StringIO(message) mess_view = StringView(mess_obj, 0, len(message)) decoded = decode(mess_view, asn1Spec=msg) message = decoded[0] return message