Home
last modified time | relevance | path

Searched refs:self (Results 1 – 13 of 13) sorted by relevance

/mcuboot-3.6.0/scripts/imgtool/
Dimage.py105 def __init__(self, endian, magic=TLV_INFO_MAGIC): argument
106 self.magic = magic
107 self.buf = bytearray()
108 self.endian = endian
110 def __len__(self): argument
111 return TLV_INFO_SIZE + len(self.buf)
113 def add(self, kind, payload): argument
117 e = STRUCT_ENDIAN_DICT[self.endian]
127 self.buf += buf
128 self.buf += payload
[all …]
Dmain.py304 def convert(self, value, param, ctx): argument
308 self.fail('%s is not a valid integer. Please use code literals '
492 def list_commands(self, ctx): argument
493 cmds = [k for k in self.commands]
494 aliases = [k for k in self._aliases]
497 def get_command(self, ctx, cmd_name): argument
498 rv = click.Group.get_command(self, ctx, cmd_name)
501 if cmd_name in self._aliases:
502 return click.Group.get_command(self, ctx, self._aliases[cmd_name])
/mcuboot-3.6.0/scripts/imgtool/keys/
Ded25519.py19 def __init__(self, key): argument
20 self.key = key
22 def shortname(self): argument
25 def _unsupported(self, name): argument
28 def _get_public(self): argument
29 return self.key
31 def get_public_bytes(self): argument
33 return self._get_public().public_bytes(
37 def get_private_bytes(self, minimal, format): argument
38 self._unsupported('get_private_bytes')
[all …]
Decdsa.py26 def __init__(self, key): argument
27 self.key = key
29 def _unsupported(self, name): argument
32 def _get_public(self): argument
33 return self.key
35 def get_public_bytes(self): argument
37 return self._get_public().public_bytes(
41 def get_public_pem(self): argument
42 return self._get_public().public_bytes(
46 def get_private_bytes(self, minimal, format): argument
[all …]
Dx25519.py20 def __init__(self, key): argument
21 self.key = key
23 def shortname(self): argument
26 def _unsupported(self, name): argument
29 def _get_public(self): argument
30 return self.key
32 def get_public_bytes(self): argument
34 return self._get_public().public_bytes(
38 def get_public_pem(self): argument
39 return self._get_public().public_bytes(
[all …]
Drsa.py27 def __init__(self, key): argument
28 self.key = key
30 def key_size(self): argument
31 return self.key.key_size
33 def shortname(self): argument
36 def _unsupported(self, name): argument
39 def _get_public(self): argument
40 return self.key
42 def get_public_bytes(self): argument
44 return self._get_public().public_bytes(
[all …]
Dgeneral.py12 def _emit(self, header, trailer, encoded_bytes, indent, file=sys.stdout, argument
16 self._emit_to_output(header, trailer, encoded_bytes, indent,
19 self._emit_to_output(header, trailer, encoded_bytes, indent,
22 def _emit_to_output(self, header, trailer, encoded_bytes, indent, file, argument
36 def emit_c_public(self, file=sys.stdout): argument
37 self._emit(
39 .format(self.shortname()),
41 encoded_bytes=self.get_public_bytes(),
44 .format(self.shortname()),
47 def emit_c_public_hash(self, file=sys.stdout): argument
[all …]
Decdsa_test.py23 def setUp(self): argument
24 self.test_dir = tempfile.TemporaryDirectory()
26 def tname(self, base): argument
27 return os.path.join(self.test_dir.name, base)
29 def tearDown(self): argument
30 self.test_dir.cleanup()
32 def test_keygen(self): argument
33 name1 = self.tname("keygen.pem")
37 self.assertIsNone(load(name1))
41 pubname = self.tname('keygen-pub.pem')
[all …]
Ded25519_test.py24 def setUp(self): argument
25 self.test_dir = tempfile.TemporaryDirectory()
27 def tname(self, base): argument
28 return os.path.join(self.test_dir.name, base)
30 def tearDown(self): argument
31 self.test_dir.cleanup()
33 def test_keygen(self): argument
34 name1 = self.tname("keygen.pem")
38 self.assertIsNone(load(name1))
42 pubname = self.tname('keygen-pub.pem')
[all …]
Drsa_test.py27 def setUp(self): argument
28 self.test_dir = tempfile.TemporaryDirectory()
30 def tname(self, base): argument
31 return os.path.join(self.test_dir.name, base)
33 def tearDown(self): argument
34 self.test_dir.cleanup()
36 def test_keygen(self): argument
38 with self.assertRaises(RSAUsageError):
42 name1 = self.tname("keygen.pem")
47 self.assertIsNone(load(name1))
[all …]
Dprivatebytes.py7 def _get_private_bytes(self, minimal, format, exclass): argument
9 format = self._DEFAULT_FORMAT
10 if format not in self._VALID_FORMATS:
12 self.shortname(), format))
13 return format, self.key.private_bytes(
15 format=self._VALID_FORMATS[format],
/mcuboot-3.6.0/ci/fih_test_docker/
Ddamage_image.py32 def __init__(self): argument
33 self.ih_magic = 0
34 self.ih_load_addr = 0
35 self.ih_hdr_size = 0
36 self.ih_protect_tlv_size = 0
37 self.ih_img_size = 0
38 self.ih_flags = 0
39 self.iv_major = 0
40 self.iv_minor = 0
41 self.iv_revision = 0
[all …]
/mcuboot-3.6.0/scripts/
Dassemble.py46 def __init__(self, output, bootdir, edt): argument
47 self.find_slots(edt)
53 self.output = output
55 def find_slots(self, edt): argument
80 self.offsets = offsets
81 self.sizes = sizes
83 def add_image(self, source, partition): argument
84 with open(self.output, 'ab') as ofd:
86 print("partition {}, pos={}, offset={}".format(partition, pos, self.offsets[partition]))
87 if pos > self.offsets[partition]:
[all …]