✏️ 正在编辑: util.cpython-312.pyc
路径:
/var/opt/nydus/ops/asn1crypto/__pycache__/util.cpython-312.pyc
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
� ��'jqU � � � d Z ddlmZmZmZmZ ddlZddlZddlmZm Z m Z mZ ddlm Z ddlmZmZ ddlmZ dd lmZ ej* d k( r ddlmZmZ nddlmZmZ ej4 dk r'dd �Zdd�Z G d� de� Z e e d� � e_ nddlmZ dd�Zdd�Zd� Z G d� de� Z e � Z!i Z"d� Z# G d� de$� Z% G d� de$� Z&y)a5 Miscellaneous data helpers, including functions for converting integers to and from bytes and UTC timezone. Exports the following items: - OrderedDict() - int_from_bytes() - int_to_bytes() - timezone.utc - utc_with_dst - create_timezone() - inet_ntop() - inet_pton() - uri_to_iri() - iri_to_uri() � )�unicode_literals�division�absolute_import�print_functionN)�datetime�date� timedelta�tzinfo� )�unwrap)� iri_to_uri� uri_to_iri)�OrderedDict)� type_name�win32)� inet_ntop� inet_pton)� c �� � | dk( r|dk( ryd}|rN| dk rId}t t j t dt | � z � dz � dz � }| d|z z d|z z } d| z }t |� dz rd |z }|j d � }|r|st |dd � dz rd|z }|�6t |� |kD rt d � �|rd}nd}||t |� z z |z }|S |rt |dd � dz dk( rd|z }|S )� Converts an integer to a byte string :param value: The integer to convert :param signed: If the byte string should be encoded using two's complement :param width: If None, the minimal possible size (but at least 1), otherwise an integer of the byte width for the return value :return: A byte string r � FTz%xg @� r �0�hex� � zint too big to convert� �)�int�math�ceil�len�abs�decode�ord� OverflowError)�value�signed�width�is_neg�bits�hex_str�output�pad_chars �@/opt/nydus/tmp/pip-target-k0fmikie/lib/python/asn1crypto/util.py�int_to_bytesr/ '