mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-12 12:16:54 +00:00
Add private key export support
- Add PRIVATE_KEY and DISABLED event types - Add packet parsing for private key export responses - Add export_private_key() method to DeviceCommands - Add comprehensive unit tests - Add BLE private key export example - Update documentation with security notes
This commit is contained in:
@@ -202,3 +202,7 @@ class DeviceCommands(CommandHandlerBase):
|
||||
|
||||
data = b"\x20" + channel_idx.to_bytes(1, "little") + name_bytes + channel_secret
|
||||
return await self.send(data, [EventType.OK, EventType.ERROR])
|
||||
|
||||
async def export_private_key(self) -> Event:
|
||||
logger.debug("Requesting private key export")
|
||||
return await self.send(b"\x17", [EventType.PRIVATE_KEY, EventType.DISABLED, EventType.ERROR])
|
||||
|
||||
Reference in New Issue
Block a user