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

Implementation of a customizable monoalphabetic substitution cipher. More...

Inheritance diagram for MonoalphabeticCipher:
Inheritance graph
Collaboration diagram for MonoalphabeticCipher:
Collaboration graph

Public Member Functions

 constructor (mapAlphabet:string="")
 Constructor for Monoalphabetic cipher.
 

Data Fields

readonly CipherName = "Monoalphabetic"
 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 a customizable monoalphabetic substitution cipher.

Uses a provided 26-letter substitution alphabet to replace each standard alphabet letter with its corresponding cipher letter. The mapping is fixed for the entire message.

Definition at line 21 of file monoAlphabetic.ts.

Member Function Documentation

◆ constructor()

MonoalphabeticCipher::constructor ( mapAlphabet:string = "")
inline

Constructor for Monoalphabetic cipher.

Parameters
mapAlphabet26-letter substitution alphabet (default: empty string)
Exceptions
Errorif mapAlphabet doesn't contain exactly 26 letters

Creates both forward and reverse mappings from the provided substitution alphabet.

Definition at line 43 of file monoAlphabetic.ts.

Field Documentation

◆ CipherName

readonly MonoalphabeticCipher::CipherName = "Monoalphabetic"

Identifier name for this cipher.

Definition at line 25 of file monoAlphabetic.ts.


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