Process aStringArray in a DUALSTRINGARRAY to extract string bindings and security bindings.
(
dual: DUALSTRINGARRAY,
)
| 641 | |
| 642 | |
| 643 | def _ParseStringArray( |
| 644 | dual: DUALSTRINGARRAY, |
| 645 | ) -> Tuple[List[STRINGBINDING], List[SECURITYBINDING]]: |
| 646 | """ |
| 647 | Process aStringArray in a DUALSTRINGARRAY to extract string bindings and |
| 648 | security bindings. |
| 649 | """ |
| 650 | str_fld = PacketListField("", [], STRINGBINDING) |
| 651 | sec_fld = PacketListField("", [], SECURITYBINDING) |
| 652 | string = str_fld.getfield(dual, dual.aStringArray[: dual.wSecurityOffset * 2])[1] |
| 653 | secs = sec_fld.getfield(dual, dual.aStringArray[dual.wSecurityOffset * 2 :])[1] |
| 654 | if string[-1].wTowerId != 0 or secs[-1].wAuthnSvc != 0: |
| 655 | raise ValueError("Invalid DUALSTRINGARRAY !") |
| 656 | return string[:-1], secs[:-1] |
| 657 | |
| 658 | |
| 659 | def _HashStringBinding(strings: List[STRINGBINDING]): |
no test coverage detected
searching dependent graphs…