<commit_before># frozen_string_literal: true
FactoryGirl.define do
  TEST_RSA_KEYS = {}.freeze

  factory :rsa_key, class: OpenSSL::PKey::RSA do
    transient { bits 2048 }

    initialize_with do
      TEST_RSA_KEYS[bits.to_i] ||= OpenSSL::PKey::RSA.new(bits)
    end

    skip_create
  end

  factory :certificate, class: OpenSSL::X509::Certificate do
    transient do
      rsa_key { create(:rsa_key) }
      subject_dn { "CN=#{SecureRandom.urlsafe_base64}" }
      issuer_dn { subject_dn }
      digest_class OpenSSL::Digest::SHA256<commit_msg>Roll back overzealous freeze in keypair factory<commit_after># frozen_string_literal: true
FactoryGirl.define do
  TEST_RSA_KEYS = {} # rubocop:disable Style/MutableConstant

  factory :rsa_key, class: OpenSSL::PKey::RSA do
    transient { bits 2048 }

    initialize_with do
      TEST_RSA_KEYS[bits.to_i] ||= OpenSSL::PKey::RSA.new(bits)
    end

    skip_create
  end

  factory :certificate, class: OpenSSL::X509::Certificate do
    transient do
      rsa_key { create(:rsa_key) }
      subject_dn { "CN=#{SecureRandom.urlsafe_base64}" }
      issuer_dn { subject_dn }
      digest_class OpenSSL::Digest::SHA256
{'fraction_non_alphanumeric': 0.10318142734307825, 'fraction_numerical': 0.02063628546861565, 'mean_word_length': 3.9322033898305087, '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': '6855491', 'n_tokens_mistral': 435, 'n_tokens_neox': 400, 'n_words': 80}