Asper Header  1.0.14
The header injector extension
Loading...
Searching...
No Matches
KeywordCipher Class Reference

Implementation of the Keyword monoalphabetic substitution cipher. More...

Inheritance diagram for KeywordCipher:
Inheritance graph
Collaboration diagram for KeywordCipher:
Collaboration graph

Public Member Functions

 constructor (keyword:string="")
 Constructor for Keyword cipher.
 

Data Fields

readonly CipherName = "Keyword"
 Identifier name for this cipher.
 
- Data Fields inherited from BaseCipher
abstract abstract encode(plaintext:string, key?:any) abstract decode(ciphertext:string, key?:any) readonly CipherName: string
 Abstract method to encode plaintext.
 

Additional Inherited Members

- Static Public Attributes inherited from BaseCipher
static readonly ALPHABET: string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 Standard English alphabet for cipher operations.
 

Detailed Description

Implementation of the Keyword monoalphabetic substitution cipher.

Creates a substitution alphabet by placing the keyword first (removing duplicates), then filling with remaining alphabet letters in order. Each plaintext letter maps to its corresponding cipher alphabet position.

Definition at line 21 of file keyWord.ts.

Member Function Documentation

◆ constructor()

KeywordCipher::constructor ( keyword:string = "")
inline

Constructor for Keyword cipher.

Parameters
keywordThe keyword to generate the cipher alphabet (default: empty string)

Builds the substitution alphabet by placing unique keyword letters first, then appending remaining alphabet letters. Creates both forward and reverse mappings.

Definition at line 43 of file keyWord.ts.

Field Documentation

◆ CipherName

readonly KeywordCipher::CipherName = "Keyword"

Identifier name for this cipher.

Definition at line 25 of file keyWord.ts.


The documentation for this class was generated from the following file: