%PDF- %PDF-
Direktori : /opt/alt/python37/lib/python3.7/site-packages/beaker/crypto/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/beaker/crypto/__pycache__/jcecrypto.cpython-37.pyc |
B ��[ � @ s| d Z ddlmZ ddlmZ ddlmZmZ ddlZee� dd��Z dd � ZeZd Z dd� Ze� d k rxede� d � dS )a� Encryption module that uses the Java Cryptography Extensions (JCE). Note that in default installations of the Java Runtime Environment, the maximum key length is limited to 128 bits due to US export restrictions. This makes the generated keys incompatible with the ones generated by pycryptopp, which has no such restrictions. To fix this, download the "Unlimited Strength Jurisdiction Policy Files" from Sun, which will allow encryption using 256 bit AES keys. � )�warn)�Cipher)� SecretKeySpec�IvParameterSpecN� �bc C s2 t �d�}t|d�}|�t j|t� |�| ��� S )NzAES/CTR/NoPaddingZAES)r ZgetInstancer �initZENCRYPT_MODE�_ivZdoFinal�tostring)�data�keyZcipherZskeySpec� r �H/opt/alt/python37/lib/python3.7/site-packages/beaker/crypto/jcecrypto.py� aesEncrypt s r Tc C s t �d�} t| d�d S )NzAES/CTR/NoPadding� � )r ZgetMaxAllowedKeyLength�min)�maxlenr r r �getKeyLength! s r � z�Crypto implementation only supports key lengths up to %d bits. Generated session cookies may be incompatible with other environmentsr )�__doc__�warningsr Zjavax.cryptor Zjavax.crypto.specr r Zjarray�zerosr r Z aesDecryptZhas_aesr r r r r �<module> s