Asper Header
1.0.22
The header injector extension
Loading...
Searching...
No Matches
rot13.ts
Go to the documentation of this file.
1
13
import
{
BaseCipher
} from
"../base/baseCipher"
;
14
22
export
class
ROT13Cipher
extends
BaseCipher
{
26
readonly
CipherName
=
"ROT13"
;
27
33
constructor
() {
34
super();
35
}
36
45
encode(input:
string
):
string
{
46
return input
47
.split(
""
)
48
.map(character => this.shiftChar(character, 13))
49
.join(
""
);
50
}
51
60
decode(input:
string
):
string
{
61
return this.encode(input);
62
}
63
}
BaseCipher
Abstract base class providing common functionality for cipher implementations.
Definition
baseCipher.ts:18
ROT13Cipher
Implementation of the ROT13 substitution cipher.
Definition
rot13.ts:22
ROT13Cipher::CipherName
readonly CipherName
Identifier name for this cipher.
Definition
rot13.ts:26
ROT13Cipher::constructor
constructor()
Constructor for ROT13 cipher.
Definition
rot13.ts:33
string
export const export const string[]
Definition
constants.ts:203
vscode
asperheader
src
modules
ciphers
flavoured
rot13.ts
Generated on Mon Sep 7 2026 00:38:30 for Asper Header by
1.12.0