<commit_before>
from ._main import (
    RSAKey as _Key,
    
    RSA_TYPE_PRIVATE as TYPE_PRIVATE,
    RSA_TYPE_PUBLIC as TYPE_PUBLIC,
    
    RSA_PAD_NONE as PAD_NONE,
    RSA_PAD_V1_5 as PAD_V1_5,
    RSA_PAD_OAEP as PAD_OAEP,
    RSA_PAD_PSS as PAD_PSS,
    
    RSA_FORMAT_PEM as FORMAT_PEM,
    RSA_FORMAT_DER as FORMAT_DER,
    
    rsa_bitlen_for_payload as bitlen_for_payload,
)

class Key(_Key):
    
    def __repr__(self):
        return '<%s.%s(%s) at 0x%x>' % (self.__class__.__module__, 
            self.__class__.__name__,
            'public' if self.is_public else 'private',id(self))


generate_key = Key.generate
key_from_string = Key.from_string
<commit_msg>More automatic import into rsa module.<commit_after>
import sys

from . import _main


self = sys.modules[__name__]

for k in dir(_main):
    if k.lower().startswith('rsa_'):
        setattr(self, k[4:], getattr(_main, k))


class Key(_main.RSAKey):
    
    def __repr__(self):
        return '<%s.%s(%s) at 0x%x>' % (self.__class__.__module__, 
            self.__class__.__name__,
            'public' if self.is_public else 'private',id(self))


generate_key = Key.generate
key_from_string = Key.from_string

{'fraction_non_alphanumeric': 0.10393964794635373, 'fraction_numerical': 0.00586756077116513, 'mean_word_length': 3.0337837837837838, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7101079', 'n_tokens_mistral': 469, 'n_tokens_neox': 440, 'n_words': 95}