mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* added Packet::getRawLength() helper
This commit is contained in:
parent
3c7ff8da29
commit
ab8cd85d8e
5 changed files with 16 additions and 7 deletions
|
|
@ -10,6 +10,10 @@ Packet::Packet() {
|
|||
payload_len = 0;
|
||||
}
|
||||
|
||||
int Packet::getRawLength() const {
|
||||
return 2 + path_len + payload_len + (hasTransCodes() ? 4 : 0);
|
||||
}
|
||||
|
||||
void Packet::calculatePacketHash(uint8_t* hash) const {
|
||||
SHA256 sha;
|
||||
uint8_t t = getPayloadType();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue