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

Implementation of the ROT13 substitution cipher. More...

Inheritance diagram for ROT13Cipher:
Inheritance graph
Collaboration diagram for ROT13Cipher:
Collaboration graph

Public Member Functions

 constructor ()
 Constructor for ROT13 cipher.
 

Data Fields

readonly CipherName = "ROT13"
 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 ROT13 substitution cipher.

A special case of Caesar cipher with a fixed shift of 13. Due to the 26-letter alphabet, shifting by 13 twice (13 + 13 = 26 ≡ 0 mod 26) returns to the original character, making ROT13 self-inverse.

Definition at line 22 of file rot13.ts.

Member Function Documentation

◆ constructor()

ROT13Cipher::constructor ( )
inline

Constructor for ROT13 cipher.

Initializes the ROT13 cipher. No parameters needed as the shift is always fixed at 13 positions.

Definition at line 33 of file rot13.ts.

Field Documentation

◆ CipherName

readonly ROT13Cipher::CipherName = "ROT13"

Identifier name for this cipher.

Definition at line 26 of file rot13.ts.


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