%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__/nsscrypto.cpython-37.pyc |
B ��[B � @ sN d Z ddlZej�� ejjZdej�e� Zdd� Zdd� Z dZ d d � ZdS )z%Encryption module that uses nsscrypto� N� c C sv t j �t�}t j �|tt j jt j jt j �|��}t j �tt j �t��}t j � tt j j||�}|� | �}|�� }|| S )N)�nss� get_best_slot�_mech�import_sym_key�PK11_OriginGeneratedZCKA_ENCRYPT�SecItem� param_from_iv�_iv�create_context_by_sym_key� cipher_op�digest_final)�data�key�slot�key_obj�param�ctx�l1�l2� r �H/opt/alt/python37/lib/python3.7/site-packages/beaker/crypto/nsscrypto.py� aesEncrypt s r c C sv t j �t�}t j �|tt j jt j jt j �|��}t j �tt j �t��}t j � tt j j||�}|� | �}|�� }|| S )N)r r r r r ZCKA_DECRYPTr r r r r r )r r r r r r r r r r r � aesDecrypt s r Tc C s dS )N� r r r r r �getKeyLength. s r )�__doc__Znss.nssr Z nss_init_nodbZCKM_AES_CBC_PADr Z get_iv_lengthr r r Zhas_aesr r r r r �<module> s