<commit_before>import * as asn1js from 'asn1js';
import { Convert } from 'pvtsutils';
import _AttributeTypeAndValue from 'pkijs/src/AttributeTypeAndValue';
import _AlgorithmIdentifier from 'pkijs/src/AlgorithmIdentifier';

export default class Basic {
  input: string;
  name?: string;
  base64: string;
  pem: string;
  hex: string;
  schema: asn1js.LocalBaseBlock;
  fingerprints: Record<string, string> = {};

  static algorithmOIDs: Record<string, { name: string; hash: string }> = {
    '1.2.840.113549.1.1.5': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-1',
    },
    '1.2.840.113549.1.1.11': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-256',
    },
    '1.2.840.113549.1.1.12': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-384',
    },
    '1.2.840.113549.1.1.13': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-512',
    },
    '1.2.840.113549.1.1.14': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-224',
    },
    '1.2.840.10045.4.1': {
      name: 'ECDSA',
      hash: 'SHA-1',
    },
    '1.2.840.10045.4.2': {
      name: 'ECDSA',
      hash: 'Recommended',
    },
    '1.2.840.10045.4.3': {
      name: 'ECDSA',
      hash: 'Specified',
    },
    '1.2.840.10045.4.3.1': {
      name: 'ECDSA',
      hash: 'SHA-224',
    },
    '1.2.840.10045.4.3.2': {
      name: 'ECDSA',
      hash: 'SHA-256',
    },
    '1.2.840.10045.4.3.3': {
      name: 'ECDSA',
      hash: 'SHA-384',
    },
    '1.2.840.10045.4.3.4': {
      name: 'ECDSA',
      hash: 'SHA-512',
    },
  };

  static subjectOIDs: Record<string, { short?: string; long: string }> = {
    '2.5.4.3': {
      short: 'CN',
      long: 'Common Name',
    },
    '2.5.4.6': {
      short: 'C',
      long: 'Country',
    },
    '2.5.4.5': {
      short: 'serialNumber',
      long: 'Serial Number',
    },
    '0.9.2342.19200300.100.1.25': {
      short: 'DC',
      long: 'Domain Component',
    },
    '1.2.840.113549.1.9.1': {
      short: 'E',
      long: 'Email',
    },
    '2.5.4.42': {
      short: 'G',
      long: 'Given Name',
    },
    '2.5.4.43': {
      short: 'I',
      long: 'Initials',
    },
    '2.5.4.7': {
      short: 'L',
      long: 'Locality',
    },
    '2.5.4.10': {
      short: 'O',
      long: 'Organization',
    },
    '2.5.4.11': {
      short: 'OU',
      long: 'Organization Unit',
    },
    '2.5.4.8': {
      short: 'ST',
      long: 'State',
    },
    '2.5.4.9': {
      short: 'Street',
      long: 'Street Address',
    },
    '2.5.4.4': {
      short: 'SN',
      long: 'Surname',
    },
    '2.5.4.12': {
      short: 'T',
      long: 'Title',
    },
    '1.2.840.113549.1.9.8': {
      long: 'Unstructured Address',
    },
    '1.2.840.113549.1.9.2': {
      long: 'Unstructured Name',
    },
    '1.3.6.1.4.1.311.60.2.1.3': {
      short: 'jurisdictionCountry',
      long: 'Jurisdiction Country',
    },
    '2.5.4.15': {
      short: 'businessCategory',
      long: 'Business Category',
    },
    '1.3.6.1.2.1.1.5': {
      long: 'Host Name',
    },
  };

  static logs = {
    '9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5': 'Akamai CT',
    '39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9': 'Alpha CT',
    'a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638': 'CNNIC CT',
    'cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900': 'Certly.IO',
    '1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4': 'Cloudflare “Nimbus2017”',
    'db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64': 'Cloudflare “Nimbus2018”',
    '747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56': 'Cloudflare “Nimbus2019”',
    '5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558': 'Cloudflare “Nimbus2020”',
    '4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8': 'Cloudflare “Nimbus2021”',
    '41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6': 'Cloudflare “Nimbus2022”',
    '7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52': 'Cloudflare “Nimbus2023”',
    '6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5': 'DigiCert Nessie2018',
    'fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c': 'DigiCert Nessie2019',
    'c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565': 'DigiCert Nessie2020',
    '<KEY>': 'DigiCert Nessie2021',
    '<KEY>': 'DigiCert Nessie2022',
    'b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a': 'DigiCert Nessie2023',
    '<KEY>': 'DigiCert Server',<commit_msg>feat(crypto): Added new type to oid list<commit_after>import * as asn1js from 'asn1js';
import { Convert } from 'pvtsutils';
import _AttributeTypeAndValue from 'pkijs/src/AttributeTypeAndValue';
import _AlgorithmIdentifier from 'pkijs/src/AlgorithmIdentifier';

export default class Basic {
  input: string;
  name?: string;
  base64: string;
  pem: string;
  hex: string;
  schema: asn1js.LocalBaseBlock;
  fingerprints: Record<string, string> = {};

  static algorithmOIDs: Record<string, { name: string; hash: string }> = {
    '1.2.840.113549.1.1.5': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-1',
    },
    '1.2.840.113549.1.1.11': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-256',
    },
    '1.2.840.113549.1.1.12': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-384',
    },
    '1.2.840.113549.1.1.13': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-512',
    },
    '1.2.840.113549.1.1.14': {
      name: 'RSASSA-PKCS1-v1_5',
      hash: 'SHA-224',
    },
    '1.2.840.10045.4.1': {
      name: 'ECDSA',
      hash: 'SHA-1',
    },
    '1.2.840.10045.4.2': {
      name: 'ECDSA',
      hash: 'Recommended',
    },
    '1.2.840.10045.4.3': {
      name: 'ECDSA',
      hash: 'Specified',
    },
    '1.2.840.10045.4.3.1': {
      name: 'ECDSA',
      hash: 'SHA-224',
    },
    '1.2.840.10045.4.3.2': {
      name: 'ECDSA',
      hash: 'SHA-256',
    },
    '1.2.840.10045.4.3.3': {
      name: 'ECDSA',
      hash: 'SHA-384',
    },
    '1.2.840.10045.4.3.4': {
      name: 'ECDSA',
      hash: 'SHA-512',
    },
  };

  static subjectOIDs: Record<string, { short?: string; long: string }> = {
    '2.5.4.3': {
      short: 'CN',
      long: 'Common Name',
    },
    '2.5.4.6': {
      short: 'C',
      long: 'Country',
    },
    '2.5.4.5': {
      short: 'serialNumber',
      long: 'Serial Number',
    },
    '0.9.2342.19200300.100.1.25': {
      short: 'DC',
      long: 'Domain Component',
    },
    '1.2.840.113549.1.9.1': {
      short: 'E',
      long: 'Email',
    },
    '2.5.4.42': {
      short: 'G',
      long: 'Given Name',
    },
    '2.5.4.43': {
      short: 'I',
      long: 'Initials',
    },
    '2.5.4.7': {
      short: 'L',
      long: 'Locality',
    },
    '2.5.4.10': {
      short: 'O',
      long: 'Organization',
    },
    '2.5.4.11': {
      short: 'OU',
      long: 'Organization Unit',
    },
    '2.5.4.8': {
      short: 'ST',
      long: 'State',
    },
    '2.5.4.9': {
      short: 'Street',
      long: 'Street Address',
    },
    '2.5.4.4': {
      short: 'SN',
      long: 'Surname',
    },
    '2.5.4.12': {
      short: 'T',
      long: 'Title',
    },
    '1.2.840.113549.1.9.8': {
      long: 'Unstructured Address',
    },
    '1.2.840.113549.1.9.2': {
      long: 'Unstructured Name',
    },
    '1.3.6.1.4.1.311.192.168.3.11': {
      short: 'jurisdictionCountry',
      long: 'Inc. Country',
    },
    '2.5.4.15': {
      short: 'businessCategory',
      long: 'Business Category',
    },
    '1.3.6.1.2.1.1.5': {
      long: 'Host Name',
    },
    '1.3.6.1.4.1.311.172.16.58.3': {
      long: 'Inc. State / Province',
    },
  };

  static logs = {
    '9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5': 'Akamai CT',
    '39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9': 'Alpha CT',
    'a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638': 'CNNIC CT',
    'cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900': 'Certly.IO',
    '1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4': 'Cloudflare “Nimbus2017”',
    'db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64': 'Cloudflare “Nimbus2018”',
    '747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56': 'Cloudflare “Nimbus2019”',
    '5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558': 'Cloudflare “Nimbus2020”',
    '4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8': 'Cloudflare “Nimbus2021”',
    '41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6': 'Cloudflare “Nimbus2022”',
    '7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52': 'Cloudflare “Nimbus2023”',
    '6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5': 'DigiCert Nessie2018',
    'fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c': 'DigiCert Nessie2019',
    'c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565': 'DigiCert Nessie2020',
    '<KEY>': 'DigiCert Nessie2021',
    '<KEY>': 'DigiCert Nessie2022',
    'b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a': 'DigiCert Nessie2023',
    '<KEY>': 'DigiCert Server',
{'fraction_non_alphanumeric': 0.17513020833333334, 'fraction_numerical': 0.2221137152777778, 'mean_word_length': 2.7105475040257647, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 62, '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': '3679979', 'n_tokens_mistral': 5254, 'n_tokens_neox': 4280, 'n_words': 540}