<commit_before>package encryptor_rsa

import (
	"crypto/rsa"
	"crypto/rand"
	"crypto/sha256"
)

var (
	randReader = rand.Reader
	PRIVATE_KEY_FILE_EXTENSION = ".pem"
)

type RsaEncryptor struct {
	PrivateKey rsa.PrivateKey
	PublicKey rsa.PublicKey
}

func GenerateEncryptor(keyLength int) (RsaEncryptor, error) {
	var rsaEncryptor RsaEncryptor

	key, err := rsa.GenerateKey(randReader, keyLength)
	if err != nil {
		return rsaEncryptor, err
	}

	rsaEncryptor = RsaEncryptor{
		PrivateKey: *key,
		PublicKey: key.PublicKey,
	}

	return rsaEncryptor, nil
}

func GenerateVoidEncryptor() RsaEncryptor {
	return RsaEncryptor{}
}

func GetEncryptedDataLength() int {
	return 344<commit_msg>private key file extension start to be constant<commit_after>package encryptor_rsa

import (
	"crypto/rsa"
	"crypto/rand"
	"crypto/sha256"
)

var (
	randReader = rand.Reader
)

const (
	PrivateKeyFileExtension = ".pem"
	DefaultKeyLength        = 2048
)

type RsaEncryptor struct {
	PrivateKey rsa.PrivateKey
	PublicKey  rsa.PublicKey
}

func GenerateEncryptor(keyLength int) (e RsaEncryptor, err error) {

	key, err := rsa.GenerateKey(randReader, keyLength)
	if err != nil {
		return e, err
	}

	e = RsaEncryptor{
		PrivateKey: *key,
		PublicKey:  key.PublicKey,
	}

	return e, nil
}

func GenerateVoidEncryptor() RsaEncryptor {
	return RsaEncryptor{}
}

func GetEncryptedDataLength() int {
	return 344
{'fraction_non_alphanumeric': 0.09451659451659451, 'fraction_numerical': 0.011544011544011544, 'mean_word_length': 4.570281124497992, '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': '1627699', 'n_tokens_mistral': 553, 'n_tokens_neox': 527, 'n_words': 118}