~ d dl Z d dlmZmZ d dlmZmZmZmZm Z m Z mZmZm Z ddlmZ dZe j dk r ed ed e Zd ed Z eed r ed ed dk rd dlmZmZmZmZ G d de Zd Zn d dlmZ d Z G d de Z e Z G d de Z!dS ) N)tobytes is_native_int) backendload_libget_raw_bufferget_c_stringnull_pointercreate_string_bufferc_ulongc_size_tc_uint8_ptr )IntegerBaseaY typedef unsigned long UNIX_ULONG; typedef struct { int a; int b; void *c; } MPZ; typedef MPZ mpz_t[1]; typedef UNIX_ULONG mp_bitcnt_t; void __gmpz_init (mpz_t x); void __gmpz_init_set (mpz_t rop, const mpz_t op); void __gmpz_init_set_ui (mpz_t rop, UNIX_ULONG op); UNIX_ULONG __gmpz_get_ui (const mpz_t op); void __gmpz_set (mpz_t rop, const mpz_t op); void __gmpz_set_ui (mpz_t rop, UNIX_ULONG op); void __gmpz_add (mpz_t rop, const mpz_t op1, const mpz_t op2); void __gmpz_add_ui (mpz_t rop, const mpz_t op1, UNIX_ULONG op2); void __gmpz_sub_ui (mpz_t rop, const mpz_t op1, UNIX_ULONG op2); void __gmpz_addmul (mpz_t rop, const mpz_t op1, const mpz_t op2); void __gmpz_addmul_ui (mpz_t rop, const mpz_t op1, UNIX_ULONG op2); void __gmpz_submul_ui (mpz_t rop, const mpz_t op1, UNIX_ULONG op2); void __gmpz_import (mpz_t rop, size_t count, int order, size_t size, int endian, size_t nails, const void *op); void * __gmpz_export (void *rop, size_t *countp, int order, size_t size, int endian, size_t nails, const mpz_t op); size_t __gmpz_sizeinbase (const mpz_t op, int base); void __gmpz_sub (mpz_t rop, const mpz_t op1, const mpz_t op2); void __gmpz_mul (mpz_t rop, const mpz_t op1, const mpz_t op2); void __gmpz_mul_ui (mpz_t rop, const mpz_t op1, UNIX_ULONG op2); int __gmpz_cmp (const mpz_t op1, const mpz_t op2); void __gmpz_powm (mpz_t rop, const mpz_t base, const mpz_t exp, const mpz_t mod); void __gmpz_powm_ui (mpz_t rop, const mpz_t base, UNIX_ULONG exp, const mpz_t mod); void __gmpz_pow_ui (mpz_t rop, const mpz_t base, UNIX_ULONG exp); void __gmpz_sqrt(mpz_t rop, const mpz_t op); void __gmpz_mod (mpz_t r, const mpz_t n, const mpz_t d); void __gmpz_neg (mpz_t rop, const mpz_t op); void __gmpz_abs (mpz_t rop, const mpz_t op); void __gmpz_and (mpz_t rop, const mpz_t op1, const mpz_t op2); void __gmpz_ior (mpz_t rop, const mpz_t op1, const mpz_t op2); void __gmpz_clear (mpz_t x); void __gmpz_tdiv_q_2exp (mpz_t q, const mpz_t n, mp_bitcnt_t b); void __gmpz_fdiv_q (mpz_t q, const mpz_t n, const mpz_t d); void __gmpz_mul_2exp (mpz_t rop, const mpz_t op1, mp_bitcnt_t op2); int __gmpz_tstbit (const mpz_t op, mp_bitcnt_t bit_index); int __gmpz_perfect_square_p (const mpz_t op); int __gmpz_jacobi (const mpz_t a, const mpz_t b); void __gmpz_gcd (mpz_t rop, const mpz_t op1, const mpz_t op2); UNIX_ULONG __gmpz_gcd_ui (mpz_t rop, const mpz_t op1, UNIX_ULONG op2); void __gmpz_lcm (mpz_t rop, const mpz_t op1, const mpz_t op2); int __gmpz_invert (mpz_t rop, const mpz_t op1, const mpz_t op2); int __gmpz_divisible_p (const mpz_t n, const mpz_t d); int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d); win32zNot using GMP on Windowsgmp)libraryapi__mpir_versionzMPIR library detectedr ctypes) Structurec_intc_void_pbyrefc $ e Zd ZdefdefdefgZdS )_MPZ _mp_alloc_mp_size_mp_dN)__name__ __module____qualname__r r _fields_ y/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Math/_IntegerGMP.pyr r p s- %('h')r$ r c 8 t t S N)r r r# r$ r% new_mpzr( u s TVV}}r$ )ffic * t j d S )NzMPZ*)r) newr# r$ r% r( r( | s wvr$ c e Zd Zd ZdS )_GMPc | d rd|dd z }n5| d rd|dd z }nt d|z t t | }t | || |S )Nmpz___gmpz_ gmp___gmp_zAttribute %s is invalid) startswithAttributeErrorgetattrlibsetattr)selfname func_namefuncs r% __getattr__z_GMP.__getattr__ s ??6"" C!DH,II __V $ $ C 48+II !:T!ABBBsI&&dD!!!r$ N)r r r! r= r# r$ r% r- r- s# r$ r- c e Zd ZdZ e Ze e ed d Z d Z d Zd Zd Z d Zd8d Zed9d Zd Zd Zd Zd Zd Zd Zd Zd ZeZd Zd Zd Zd Zd Zd Z d:dZ!d:dZ"d Z#d:dZ$d Z%d Z&d! Z'd" Z(d# Z)d$ Z*d% Z+d&