INNER CODE UNIT · Python

NewKeyCommandBase

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

class NewKeyCommandBase(Command):
    '''
    creates a key to a token within a tpm2-pkcs11 store.
    '''

    def generate_options(self, group_parser):
        group_parser.add_argument(
            '--label',
            help='The tokens label to import the key too.\n',
            required=True)
        group_parser.add_argument(
            '--key-label',
            help='The label of the key imported. Defaults to an integer value.\n')
        group_parser.add_argument(
            '--id',
            help='The key id. Defaults to a random 8 bytes of hex.\n',
            default=binascii.hexlify(os.urandom(8)).decode())
        group_parser.add_argument(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…