File: test_platform.py

package info (click to toggle)
python-mbedtls 2.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 960 kB
  • sloc: python: 4,595; sh: 170; makefile: 18
file content (15 lines) | stat: -rw-r--r-- 302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# SPDX-License-Identifier: MIT

from __future__ import annotations

import mbedtls._platform as _plt


def test_zeroize_bytes() -> None:
    binary = bytearray(b"0123456789abcdef")
    length = len(binary)

    _plt.zeroize(binary)

    assert len(binary) == length
    assert binary == b"\0" * length