MCPcopy Create free account
hub / github.com/adobe/Marinus / __splitBytes

Method __splitBytes

python3_cron_scripts/libs3/X509Parser.py:637–651  ·  view source on GitHub ↗

Split buf into two strings (part1, part2) where part1 has count bytes. @raises ValueError if buf is too short.

(self, buf, count)

Source from the content-addressed store, hash-verified

635 return None
636
637 def __splitBytes(self, buf, count):
638 """
639 Split buf into two strings (part1, part2) where part1 has count bytes.
640 @raises ValueError if buf is too short.
641 """
642 if len(buf) < count:
643 raise ValueError(
644 (
645 "Malformed structure encountered when parsing SCT, "
646 + "expected %d bytes, got only %d"
647 )
648 % (count, len(buf))
649 )
650
651 return buf[:count], buf[count:]
652
653 def __parse_sct(self, asn1_sctList, sct_type):
654 """

Callers 1

__parse_sctMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected