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

Implementation of the Rail Fence transposition cipher. More...

Inheritance diagram for RailFenceCipher:
Inheritance graph
Collaboration diagram for RailFenceCipher:
Collaboration graph

Public Member Functions

 constructor ()
 Constructor for Rail Fence cipher.
 

Data Fields

readonly CipherName = "RailFence"
 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 Rail Fence transposition cipher.

Arranges plaintext in a zigzag pattern across multiple rails (rows), then reads the text row-wise to create the ciphertext. The pattern alternates direction when reaching the top or bottom rail.

Definition at line 21 of file railfence.ts.

Member Function Documentation

◆ constructor()

RailFenceCipher::constructor ( )
inline

Constructor for Rail Fence cipher.

Initializes the Rail Fence cipher. The number of rails is specified during encode/decode operations.

Definition at line 32 of file railfence.ts.

Field Documentation

◆ CipherName

readonly RailFenceCipher::CipherName = "RailFence"

Identifier name for this cipher.

Definition at line 25 of file railfence.ts.


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