Skip to content
Success

Changes

Summary

  1. construct: move __bytes_required to utils and finish the implementation (details)
  2. osmocom.construct.Asn1DerInteger (details)
Commit 95d7ab01e71dc674c5f671bb79eab717f91d02c1 by pmaier@sysmocom.de
construct: move __bytes_required to utils and finish the implementation

The method __bytes_required in the GreedyInteger class computes how many
byte a given integer number requires, when it is encoded. This method
currently only works for unsigned integers. Let's move it to utils and
add support for signed integers.

Related: SYS#7094
Change-Id: I9ae4acc30dbd5fb6a6b24b10254ffb205bfde52d
The file was modifiedtests/test_utils.py
The file was modifiedsrc/osmocom/construct.py
The file was modifiedsrc/osmocom/utils.py
Commit 6851b921ac780a19ea811ddee0140c50ea32e231 by pmaier@sysmocom.de
osmocom.construct.Asn1DerInteger

This is a 'construct' type which can be used for encoding/decoding
integer values according to ASN.1 DER encoding rules.

Related: SYS#7094
Change-Id: I0cfe97daf957919de86453d6d44f9c99ab3075ac
The file was modifiedsrc/osmocom/construct.py
The file was modifiedtests/test_construct.py