libais
libais copied to clipboard
Add ID:s
- Hash of original lines
- Hash of nmea line contents (without tagblock etc)
- Random id for differentiating copies of the same line
@redhog suggested https://docs.python.org/2/library/uuid.html for the random id.
Possibly shortened by using a base64 rather than hex encoding:
import uuid, base64
msg_id = base64.b64encode(uuid.uuid4().bytes)
We can't just use the raw bytes, as e.g. the json container does not support that.