Device ID From Public Key • AI Agent SDK
device_id_from_public_key: Return the stable device id: hex SHA-256 of the raw public-key bytes.
device_id_from_public_key
Function
</div>
This function is defined in the protocols module.
Return the stable device id: hex SHA-256 of the raw public-key bytes.
`public_key must be standard base64 (RFC 4648, padded, no whitespace) of the raw key bytes. Hashing the decoded bytes keeps the id independent of how a client spells the encoding. Raises ValueError` on invalid base64.
Signature
def device_id_from_public_key(public_key: str) -> strParameters
ParamField
strNo description available.
Returns
ResponseField
strThe result of the operation.
Uses
hexdigesthashlib.sha256base64.b64decode
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 362