CyberAlphaWolf

Server : Apache
System : Linux 182.49.167.72.host.secureserver.net 4.18.0-553.92.1.el8_10.x86_64 #1 SMP Wed Jan 14 06:31:58 EST 2026 x86_64
User : kikai ( 1014)
PHP Version : 8.3.30
Disable Function : NONE
Directory :  /var/opt/nydus/ops/oscrypto/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/opt/nydus/ops/oscrypto/_int.py
# coding: utf-8

"""
Function to fill ensure integers converted to a byte string are a specific
width. Exports the following items:

 - fill_width()
"""

from __future__ import unicode_literals, division, absolute_import, print_function


__all__ = [
    'fill_width',
]


def fill_width(bytes_, width):
    """
    Ensure a byte string representing a positive integer is a specific width
    (in bytes)

    :param bytes_:
        The integer byte string

    :param width:
        The desired width as an integer

    :return:
        A byte string of the width specified
    """

    while len(bytes_) < width:
        bytes_ = b'\x00' + bytes_
    return bytes_

XYZEAZ - Cyber Alpha Wolf © All Rights Reserved