<commit_before>// Type definitions for node-forge 0.7.5
// Project: https://github.com/digitalbazaar/forge
// Definitions by: <NAME> <https://github.com/westy92>
//                 <NAME> <https://github.com/flynetworks>
//                 <NAME> <https://github.com/a-k-g>
//                 Rafal2228 <https://github.com/rafal2228>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare module "node-forge" {
    type Byte = string;
    type Bytes = string;
    type Hex = string;
    type Base64 = string;
    type Utf8 = string;
    type OID = string;

    namespace pem {

		interface EncodeOptions {
			maxline?: number;
		}

		interface ObjectPEM {
			type: string;
			body: Bytes;
			procType?: any;
			contentDomain?: any;
			dekInfo?: any;
			headers?: any[];
		}

		function encode(msg: ObjectPEM, options?: EncodeOptions): string;
		function decode(str: string): ObjectPEM[];
	}

    namespace pki {

        type PEM = string;
        type Key = any;

        interface KeyPair {
            publicKey: Key;
            privateKey: Key;
        }

		function pemToDer(pem: PEM): util.ByteStringBuffer;
        function privateKeyToPem(key: Key, maxline?: number): PEM;
		function privateKeyInfoToPem(key: Key, maxline?: number): PEM;
        function publicKeyToPem(key: Key, maxline?: number): PEM;
        function publicKeyFromPem(pem: PEM): Key;
        function privateKeyFromPem(pem: PEM): Key;
        function certificateToPem(cert: Certificate, maxline?: number): PEM;

        interface oids {
            [key: string]: string;
        }
        var oids: oids;

        namespace rsa {

            interface GenerateKeyPairOptions {
                bits?: number;
                e?: number;
                workerScript?: string;
                workers?: number;
                workLoad?: number;
                prng?: any;
                algorithm?: string;
            }

            function generateKeyPair(bits?: number, e?: number, callback?: (err: Error, keypair: KeyPair) => void): KeyPair;<commit_msg>Replaced introduced tabs<commit_after>// Type definitions for node-forge 0.7.5
// Project: https://github.com/digitalbazaar/forge
// Definitions by: <NAME> <https://github.com/westy92>
//                 <NAME> <https://github.com/flynetworks>
//                 <NAME> <https://github.com/a-k-g>
//                 Rafal2228 <https://github.com/rafal2228>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare module "node-forge" {
    type Byte = string;
    type Bytes = string;
    type Hex = string;
    type Base64 = string;
    type Utf8 = string;
    type OID = string;

    namespace pem {

        interface EncodeOptions {
            maxline?: number;
        }

        interface ObjectPEM {
            type: string;
            body: Bytes;
            procType?: any;
            contentDomain?: any;
            dekInfo?: any;
            headers?: any[];
        }

        function encode(msg: ObjectPEM, options?: EncodeOptions): string;
        function decode(str: string): ObjectPEM[];
    }

    namespace pki {

        type PEM = string;
        type Key = any;

        interface KeyPair {
            publicKey: Key;
            privateKey: Key;
        }

        function pemToDer(pem: PEM): util.ByteStringBuffer;
        function privateKeyToPem(key: Key, maxline?: number): PEM;
        function privateKeyInfoToPem(key: Key, maxline?: number): PEM;
        function publicKeyToPem(key: Key, maxline?: number): PEM;
        function publicKeyFromPem(pem: PEM): Key;
        function privateKeyFromPem(pem: PEM): Key;
        function certificateToPem(cert: Certificate, maxline?: number): PEM;

        interface oids {
            [key: string]: string;
        }
        var oids: oids;

        namespace rsa {

            interface GenerateKeyPairOptions {
                bits?: number;
                e?: number;
                workerScript?: string;
                workers?: number;
                workLoad?: number;
                prng?: any;
                algorithm?: string;
            }

            function generateKeyPair(bits?: number, e?: number, callback?: (err: Error, keypair: KeyPair) => void): KeyPair;
{'fraction_non_alphanumeric': 0.11296775711932219, 'fraction_numerical': 0.007531183807954813, 'mean_word_length': 1.9824561403508771, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 12, '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': '93922', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1212, 'n_words': 319}