INNER CODE UNIT · Python

do_str

tpm2-software/tpm2-pkcs11 · tools/tpm2_pkcs11/commandlets_keys.py:430

    def do_str(value):
        return binascii.hexlify(value.encode()).decode()

    @staticmethod
    def do_raw(value):
        return value

    @classmethod
    def mod(cls, path, tid, key, value, inattrs, vtype):

        with Db(path) as db:
            obj = db.getobject(tid)
            if obj is None:
                sys.exit('Not found, object with id: {}'.format(tid))
        s = obj['attrs']
        obj_attrs = yaml.safe_load(s)

        # if we don't have any update data, just dump the attributes

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…