redacted-ts
Version:
Redacting classified documents
20 lines (19 loc) • 1.19 kB
TypeScript
import * as feistel from 'feistel-cipher';
import { Dictionary } from './Dictionary';
export declare const DEFAULT_TAG = "~";
export interface Redactor {
dictionary: Dictionary;
tag: string;
cipher: feistel.FPECipher;
both: boolean;
redact: (line: string, ...delimiters: ReadonlyArray<string>) => string;
expand: (line: string) => string;
clean: (str: string) => string;
}
export declare const redact: (dictionary: Dictionary, tag: string, cipher: feistel.FPECipher, both: boolean) => (line: string, ...delimiters: ReadonlyArray<string>) => string;
export declare const expand: (dictionary: Dictionary, tag: string, cipher: feistel.FPECipher, both: boolean) => (line: string) => string;
export declare const clean: (tag: string) => (str: string) => string;
export declare const Redactor: (dictionary: Dictionary, tag: string, cipher: feistel.FPECipher, both: boolean) => Redactor;
export declare const RedactorWithDictionary: (dictionary: Dictionary, cipher: feistel.FPECipher) => Redactor;
export declare const RedactorWithTag: (tag: string, cipher: feistel.FPECipher) => Redactor;
export declare const DefaultRedactor: (cipher: feistel.FPECipher) => Redactor;