<commit_before>#!/usr/bin/python

from Crypto.Cipher import AES
import scrypt
import hashlib
from binascii import hexlify, unhexlify
import unittest
import sys
from .account import PrivateKey, PublicKey, Address
from .base58 import ripemd160,Base58,base58encode,base58decode

"""
This class and the methods require python3
"""
assert sys.version_info[0] == 3, "graphenelib requires python3"

def _encrypt_xor(a, b, aes):
    'Returns encrypt(a ^ b).'
    return aes.encrypt(unhexlify('%0.32x' % (int((a), 16) ^ int(hexlify(b), 16))))

def encrypt(privkey,passphrase):
    '''BIP0038 non-ec-multiply encryption. Returns BIP0038 encrypted privkey.'''
    privkeyraw    = bytes(privkey) # bytes<commit_msg>[Bip38] import cleanup<commit_after>#!/usr/bin/python

from Crypto.Cipher import AES
import scrypt
import hashlib
from binascii import hexlify, unhexlify
import unittest
import sys
from graphenebase.account import PrivateKey, PublicKey, Address
from graphenebase.base58 import ripemd160,Base58,base58encode,base58decode

"""
This class and the methods require python3
"""
assert sys.version_info[0] == 3, "graphenelib requires python3"

def _encrypt_xor(a, b, aes):
    'Returns encrypt(a ^ b).'
    return aes.encrypt(unhexlify('%0.32x' % (int((a), 16) ^ int(hexlify(b), 16))))

def encrypt(privkey,passphrase):
    '''BIP0038 non-ec-multiply encryption. Returns BIP0038 encrypted privkey.'''
    privkeyraw    = bytes(privkey) # bytes
{'fraction_non_alphanumeric': 0.11674774148714386, 'fraction_numerical': 0.043085476025017375, 'mean_word_length': 5.457399103139013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5409439', 'n_tokens_mistral': 540, 'n_tokens_neox': 483, 'n_words': 133}