API Reference
Modules
ClassicCiphers.ClassicCiphers — ModuleClassicCiphers is a Julia module that implements various classical cryptographic ciphers.
This module provides functionality for encrypting and decrypting messages using traditional cryptographic methods that were historically used before modern cryptography.
While these ciphers are not secure for modern use, they are valuable for educational purposes and understanding the fundamentals of cryptography.
ClassicCiphers.Alphabet — ModuleAlphabetA module containing alphabet-related functionality for classic ciphers.
This module provides various utilities and constants for handling alphabets in cryptographic operations, particularly for classic cipher implementations.
ClassicCiphers.Ciphers — ModuleA module containing classic cipher implementations for text encryption and decryption.
This module provides functions to work with various historical and classic ciphers, allowing users to encrypt and decrypt text using different cipher algorithms.
Module Contents
- Cipher implementation functions
 - Encryption and decryption utilities
 - Helper functions for cipher operations
 
ClassicCiphers.Traits — Modulemodule TraitsA module containing type traits for classification and operations on classical ciphers.
This module provides a system of traits to define and categorize different types of classical cryptographic ciphers, their characteristics, and operations.
Alphabet
ClassicCiphers.Alphabet.AlphabetParameters — TypeAlphabetParameters: Configuration for alphabet handling
Fields:
- alphabet: Set of valid characters
 
Constants
ClassicCiphers.Alphabet.UPPERCASE_LETTERS — ConstantUPPERCASE_LETTERSStandard uppercase Latin alphabet (A-Z).
ClassicCiphers.Alphabet.LOWERCASE_LETTERS — ConstantLOWERCASE_LETTERSStandard lowercase Latin alphabet (a-z).
ClassicCiphers.Alphabet.DIGITS_LETTERS — ConstantDIGITS_LETTERSNumeric digits (0-9).
Abstract Types
ClassicCiphers.AbstractCipher — TypeAbstractCipher{ACTION}Abstract type for all ciphers in the package.
Type parameters
ACTION::Bool: true for encryption, false for decryption
ClassicCiphers.AbstractStreamCipherConfiguration — TypeAbstractStreamCipherConfiguration{ACTION} <: AbstractCipher{ACTION}Abstract type for ciphers that process text as a continuous stream of characters.
ClassicCiphers.Ciphers.AbstractCipherState — Typeabstract type AbstractCipherState endBase abstract type for representing the internal state of a cipher. This type serves as the parent type for all concrete cipher state implementations.
All subtypes should maintain the necessary state information required for encryption and decryption operations in stream ciphers.
Extended help
Implementation
When implementing a new cipher state type:
- Create a concrete type that inherits from 
AbstractCipherState - Define necessary fields to store the cipher's internal state
 - Implement required methods for state manipulation
 
Cipher state
ClassicCiphers.Ciphers.State — FunctionState(cipher::AbstractStreamCipherConfiguration)Create an initial empty cipher state for a given stream cipher configuration.
Arguments
cipher::AbstractStreamCipherConfiguration: The configuration of the stream cipher
Returns
EmptyCipherState: An empty cipher state instance
This function serves as a default implementation for stream ciphers that don't require state initialization. For ciphers that need specific state initialization, this method should be overridden.
State(cipher::FormattingCipher)Create initial state for formatting cipher operation. Returns a new FormattingState instance to track character accumulation.
ClassicCiphers.Ciphers.EmptyCipherState — TypeEmptyCipherState <: AbstractCipherStateA concrete implementation of AbstractCipherState representing an empty cipher state.
This struct is used as a null object pattern for cipher states when no state information needs to be maintained during encryption/decryption operations.
ClassicCiphers.Ciphers.ValidCharCount — TypeA mutable struct representing character count tracking for stream ciphers.
Implements the AbstractCipherState interface to maintain state information about valid characters encountered during encryption/decryption operations.
Case Handling
ClassicCiphers.Traits.InputCaseMode — TypeInputCaseModeEnumeration of input case handling modes.
Values
NOT_CASE_SENSITIVE: Treat upper/lowercase as same (default)CASE_SENSITIVE: Distinguish between upper/lowercase
ClassicCiphers.Traits.OutputCaseMode — TypeOutputCaseModeEnumeration for output case handling modes.
ClassicCiphers.Traits.InputCaseHandler — TypeInputCaseHandler{M} <: InputCaseHandlingTraitTrait type for handling input case sensitivity.
Type parameters
M: Type of case mode (usuallyInputCaseMode)
Fields
mode::M: The case handling mode to use
ClassicCiphers.Traits.CaseHandler — TypeCaseHandler{M} <: OutputCaseHandlingTraitConcrete handler for output case transformations.
Type parameters
M: Type of case mode (usuallyOutputCaseMode)
ClassicCiphers.Traits.case_sensitive — Functioncase_sensitive()Create an InputCaseHandler that distinguishes between uppercase and lowercase letters.
Returns
InputCaseHandler{InputCaseMode}: Handler withCASE_SENSITIVEmode
ClassicCiphers.Traits.not_case_sensitive — Functionnot_case_sensitive()Create an InputCaseHandler that treats uppercase and lowercase letters as equivalent.
Returns
InputCaseHandler{InputCaseMode}: Handler withNOT_CASE_SENSITIVEmode
See Also
ClassicCiphers.Traits.iscasesensitive — Functioniscasesensitive(handler::InputCaseHandler)Check if an input case handler distinguishes between uppercase and lowercase letters.
Arguments
handler::InputCaseHandler: The case handler to check
Returns
Bool:trueif handler is case sensitive,falseotherwise
See Also
ClassicCiphers.Traits.preserve_case — FunctionReturns a CaseHandler instance configured to preserve the case of characters during cipher operations.
This means the output will maintain the same case (uppercase/lowercase) as the input text.
Returns
CaseHandler: A case handling object with PRESERVE_CASE behavior
ClassicCiphers.Traits.is_preserve — Functionis_preserve(handler::CaseHandler) -> BoolCheck if a CaseHandler is configured to preserve the original case of characters.
Returns true if the handler's mode is set to preserve case, false otherwise.
Arguments
handler::CaseHandler: The case handler object to check
ClassicCiphers.Traits.lowercase_case — Functionlowercase_case()Create a CaseHandler instance that converts text to lowercase.
Returns
CaseHandler: A case handler that processes text to ensure all characters are lowercase.
ClassicCiphers.Traits.is_lowercase — Functionis_lowercase(handler::CaseHandler) -> BoolCheck if the case mode of the handler is set to lowercase.
Arguments
handler::CaseHandler: The case handler to check
Returns
true if the handler's mode is lowercase, false otherwise.
ClassicCiphers.Traits.uppercase_case — Functionuppercase_case()Create a CaseHandler instance set to handle uppercase text output.
Returns
CaseHandler: A case handler configured to convert output text to uppercase.
ClassicCiphers.Traits.is_uppercase — Functionis_uppercase(handler::CaseHandler) -> BoolCheck if the CaseHandler is set to uppercase mode.
Returns true if the handler's mode is set to UPPERCASE_CASE, false otherwise.
Arguments
handler::CaseHandler: The case handler to check
Returns
Bool:trueif uppercase mode is set,falseotherwise
ClassicCiphers.Traits.cccase — Functioncccase()Create a CaseHandler instance with the standard common case format (CCCASE).
Returns a CaseHandler object that maintains the case format of cryptographic operations using the common case convention.
ClassicCiphers.Traits.is_cccase — Functionis_cccase(handler::CaseHandler) -> BoolCheck if the given case handler uses 'CCCASE' mode.
Returns true if the case handler's mode is set to CCCASE, false otherwise.
Arguments
handler::CaseHandler: The case handler object to check.
ClassicCiphers.Traits.default_case — Functiondefault_case()Create a CaseHandler with the default case settings.
Returns a CaseHandler initialized with DEFAULT_CASE, which determines the letter case handling behavior for text processing operations.
Returns
CaseHandler: A new case handler instance with default case settings.
ClassicCiphers.Traits.is_default — Functionis_default(handler::CaseHandler) -> BoolCheck if a case handler is in default case mode.
Arguments
handler::CaseHandler: The case handler to check.
Returns
Bool:trueif the case handler is in default case mode,falseotherwise.
ClassicCiphers.Traits.apply_case — Functionapply_case(handler::CaseHandler, plain_char::Char, base_char::Char, enc::Bool)Applies the case transformation to a character based on the provided CaseHandler.
Arguments
handler::CaseHandler: The case handler that defines how the case transformation should be applied.plain_char::Char: The character to which the case transformation will be applied.base_char::Char: The base character used to determine the case transformation.enc::Bool: A boolean flag indicating whether the transformation is for encoding (true) or decoding (false).
Returns
Char: The character after applying the case transformation.
Unknown Symbol Handling
ClassicCiphers.Traits.UnknownSymbolHandlingTrait — TypeUnknownSymbolHandlingTrait <: CipherTraitAbstract type representing the handling behavior for unknown symbols in cipher operations.
This trait defines how a cipher should process symbols that are not part of its defined alphabet or symbol set. Concrete subtypes should specify specific handling strategies, such as ignoring, throwing errors, or substituting with default values.
Type Hierarchy
- Supertype: 
CipherTrait 
Extended By
Concrete implementations should extend this type to define specific handling behaviors.
ClassicCiphers.Traits.UnknownSymbolMode — TypeUnknownSymbolModeEnumeration type defining possible modes for handling unknown symbols during cipher operations.
This enum specifies how the cipher should behave when encountering symbols that are not part of the defined cipher alphabet or symbol set.
ClassicCiphers.Traits.SymbolHandler — TypeSymbolHandler{M} <: UnknownSymbolHandlingTraitA type that defines how unknown symbols should be handled during encryption/decryption operations.
The type parameter M specifies the mode of handling unknown symbols.
Type Parameters
M: The mode of handling unknown symbols (e.g., error, ignore, replace)
Inheritance
Subtype of UnknownSymbolHandlingTrait
ClassicCiphers.Traits.ignore_symbol — Functionignore_symbol()Return a SymbolHandler instance configured to ignore symbols during cipher operations.
The returned handler is initialized with the IGNORE_SYMBOL constant, which defines the behavior of ignoring non-alphabetic characters in the text being processed.
Returns
SymbolHandler: A handler instance configured for symbol ignoring behavior
ClassicCiphers.Traits.is_ignore — Functionis_ignore(handler::SymbolHandler)Returns true if the SymbolHandler is set to ignore symbols, false otherwise.
When a handler is in ignore mode, it will pass through unknown symbols without modification during cipher operations.
Arguments
handler::SymbolHandler: The symbol handler to check.
Returns
Bool:trueif the handler's mode is set toIGNORE_SYMBOL,falseotherwise.
ClassicCiphers.Traits.remove_symbol — Functionremove_symbol()Create a SymbolHandler that removes symbols from text.
Returns a SymbolHandler instance configured to remove symbols during encryption or decryption operations.
Returns
SymbolHandler: A symbol handler configured to remove symbols from text
ClassicCiphers.Traits.is_remove — Functionis_remove(handler::SymbolHandler) -> BoolCheck if the mode of the SymbolHandler is set to remove symbols.
Returns
trueif the handler's mode is set to remove symbolsfalseotherwise
ClassicCiphers.Traits.replace_symbol — Functionreplace_symbol()Create a SymbolHandler with the REPLACE_SYMBOL strategy for handling symbols in text processing.
This function returns a SymbolHandler object configured to replace symbols according to the predefined REPLACE_SYMBOL behavior.
Returns
SymbolHandler: A new symbol handler instance with replace strategy
ClassicCiphers.Traits.is_replace — Functionis_replace(handler::SymbolHandler) -> BoolCheck if the SymbolHandler's mode is set to replace symbols.
Returns true if the handler's mode is REPLACE_SYMBOL, false otherwise.
ClassicCiphers.Traits.transform_symbol — Functiontransform_symbol(handler::SymbolHandler, plain_char::Char)Transform a single plain character using the provided SymbolHandler.
Arguments
handler::SymbolHandler: The handler responsible for symbol transformationplain_char::Char: The character to be transformed
Returns
A transformed character based on the handler's transformation rules.
Cipher Traits
ClassicCiphers.Traits.CipherTrait — Typeabstract type CipherTrait endA base abstract type representing cipher traits in the ClassicCiphers package.
This type serves as the root of the cipher trait type hierarchy, allowing for type-based dispatch and classification of different cipher algorithms and their characteristics.
Extended help
Subtypes of CipherTrait should represent specific properties or behaviors of cipher algorithms, enabling type-based dispatch for encryption and decryption operations.
ClassicCiphers.Traits.CipherTypeTrait — TypeAn abstract type representing cipher categories.
CipherTypeTrait serves as a base type for traits that classify different types of ciphers. This trait hierarchy is used for dispatch and categorization of cipher algorithms.
ClassicCiphers.Traits.SubstitutionTrait — TypeSubstitutionTrait <: CipherTypeTraitA trait type representing substitution ciphers.
This abstract type is used to classify ciphers that operate by substituting one character for another according to a defined pattern or key. It is a subtype of CipherTypeTrait, which is the base trait for all cipher type classifications.
ClassicCiphers.Traits.ShiftSubstitution — TypeShiftSubstitution <: SubstitutionTraitA trait type representing shift substitution ciphers.
Shift substitution is a type of substitution cipher where each letter in the plaintext is shifted a certain number of positions in the alphabet. The most famous example is the Caesar cipher, which uses a shift of 3.
Handling Traits
ClassicCiphers.Traits.InputCaseHandlingTrait — TypeInputCaseHandlingTrait <: CipherTraitAbstract type for traits that control how ciphers handle letter case in input text.
ClassicCiphers.Traits.OutputCaseHandlingTrait — TypeOutputCaseHandlingTrait <: CipherTraitAbstract type for traits controlling output case handling.
Core Functions
Base.inv — Functioninv(cipher::FormattingCipher{ENC}) where {ENC}Create an inverse formatting cipher that removes the formatting applied by the original cipher.
Returns
FormattingCipher{!ENC}: A new formatting cipher for unformatting
Examples
# Create cipher and inverse
formatter = FormattingCipher()
unformatter = inv(formatter)
# They cancel each other out
message = "SECRETMESSAGE"
formatted = formatter(message)    # "SECRE TMESS AGE"
unformatted = unformatter(formatted)  # "SECRETMESSAGE"inv(cipher::SubstitutionCipher{ENC}) where {ENC}Create an inverse substitution cipher by reversing the character mapping.
The inverse cipher:
- Swaps each key-value pair in the mapping dictionary
 - Preserves alphabet parameters
 - Toggles the encryption flag
 
Arguments
cipher::SubstitutionCipher{ENC}: The cipher to invert
Returns
SubstitutionCipher{!ENC}: A new substitution cipher with reversed mapping
Examples
# Create cipher and inverse
mapping = Dict('A'=>'X', 'B'=>'Y', 'C'=>'Z')
cipher = SubstitutionCipher(mapping)
decipher = inv(cipher)
# They cancel each other out
plaintext = "ABC"
ciphertext = cipher(plaintext)    # "XYZ"
recovered_plaintext = decipher(ciphertext) # "ABC"inv(cipher::ROT13Cipher{ENC}) where {ENC}Create an inverse ROT13 cipher. Since ROT13 is self-inverse (shifting by 13 twice returns to the original position), the inverse only toggles the encryption flag while keeping the same shift.
Arguments
cipher::ROT13Cipher{ENC}: The cipher to invert
Returns
ROT13Cipher{!ENC}: A new ROT13 cipher with toggled encryption flag
Examples
# Create cipher and inverse
cipher = ROT13Cipher()
decipher = inv(cipher)
# Both perform the same transformation
plaintext = "HELLO"
ciphertext1 = cipher(plaintext)     # "URYYB"
ciphertext2 = decipher(plaintext)   # "URYYB"
# Applying either twice returns original
cipher(cipher(plaintext))  # "HELLO"inv(cipher::CaesarCipher{ENC}) where {ENC}Create an inverse cipher that decrypts messages encrypted with the original cipher.
The inverse cipher:
- Reverses the shift direction (-shift)
 - Toggles the encryption flag
 - Keeps the same alphabet parameters
 
Arguments
cipher::CaesarCipher{ENC}: The cipher to invert
Returns
CaesarCipher{!ENC}: A new Caesar cipher that decrypts messages encrypted with the input cipher
Examples
# Create a cipher and its inverse
cipher = CaesarCipher(shift=3)
decipher = inv(cipher)
# They cancel each other out
plaintext = "HELLO"
ciphertext = cipher(plaintext)    # "KHOOR"
recovered_plaintext = decipher(ciphertext) # "HELLO"inv(cipher::AffineCipher{ENC}) where {ENC}Create an inverse cipher that decrypts messages encrypted with the original cipher.
The inverse cipher:
- Uses the modular multiplicative inverse of 'a'
 - Adjusts the shift parameter accordingly
 - Preserves alphabet parameters
 
Arguments
cipher::AffineCipher{ENC}: The cipher to invert
Returns
AffineCipher{!ENC}: A new affine cipher for decryption
Examples
# Create cipher and inverse
cipher = AffineCipher(a=5, b=8)
decipher = inv(cipher)
# They cancel each other out
plaintext = "HELLO"
ciphertext = cipher(plaintext)
recovered_plaintext = decipher(ciphertext) # Returns "HELLO"inv(cipher::XORCipher{ENC, T}) where {ENC, T}Create an inverse XOR cipher. Since XOR is its own inverse, this only toggles the encryption flag while keeping the same key.
Returns
XORCipher{!ENC, T}: A new XOR cipher with toggled encryption flag
inv(cipher::VigenereCipher{ENC}) where {ENC}Create an inverse Vigenère cipher by keeping the same key but toggling encryption mode.
The inverse cipher:
- Uses the same key
 - Toggles the encryption flag
 - Keeps the same alphabet parameters
 
Arguments
cipher::VigenereCipher{ENC}: The cipher to invert
Returns
VigenereCipher{!ENC}: A new Vigenère cipher for decryption
Examples
# Create cipher and inverse
cipher = VigenereCipher("SECRET")
decipher = inv(cipher)
# They cancel each other out
plaintext = "HELLO"
ciphertext = cipher(plaintext)
recovered_plaintext = decipher(ciphertext) # Returns "HELLO"inv(cipher::VernamCipher{ENC}) where {ENC}Creates and returns a new Vernam cipher that is the inverse operation of the input cipher. For a Vernam cipher, the inverse operation uses the same key but with opposite encryption direction (encryption ↔ decryption).
Arguments
cipher::VernamCipher{ENC}: The Vernam cipher to be inverted
Returns
VernamCipher: A new Vernam cipher that performs the inverse operation
inv(morse::MorseCode{ENC}) where {ENC}Create an inverse Morse code handler that decodes messages encoded with the original handler.
Arguments
morse::MorseCode{ENC}: The Morse code handler to invert
Returns
MorseCode{!ENC}: A new Morse code handler for the opposite operation
Examples
# Create encoder and decoder
morse = MorseCode()
demorse = inv(morse)
# They perform opposite operations
plaintext  = "HELLO WORLD"
codetext = morse(plaintext)     # ".... . .-.. .-.. --- / .-- --- .-. .-.. -.."
recovered_plaintext = demorse(codetext)   # "HELLO WORLD"ClassicCiphers.Ciphers.transform_index — Functiontransform_index(cipher::SubstitutionCipher, index::Int)Transforms a character index using the substitution mapping defined in the cipher.
Arguments
cipher::SubstitutionCipher: The substitution cipher containing the mappingindex::Int: The index of the character to transform (1-based indexing)
Returns
The transformed index according to the cipher's substitution mapping.
transform_index(cipher::CaesarCipher{ENC}, index::Int) where {ENC}Transform a character position in the alphabet by shifting it according to the cipher's shift value.
Type parameters
ENC::Bool: true for encryption, false for decryption
Arguments
cipher::CaesarCipher{ENC}: The Caesar cipher instanceindex::Int: Original position in the alphabet (1-based)
Returns
Int: New position after applying the shift (1-based)
Examples
cipher = CaesarCipher(shift=3)
transform_index(cipher, 1)  # Returns 4 (A -> D)
transform_index(cipher, 26) # Returns 3 (Z -> C)transform_index(cipher::AffineCipher{ENC}, index::Int) where {ENC}Transform a character position using the affine transformation E(x) = (ax + b) mod m for encryption or D(x) = a⁻¹(x - b) mod m for decryption.
The decryption formula uses the modular multiplicative inverse of 'a'.
Arguments
cipher::AffineCipher{ENC}: The affine cipher instanceindex::Int: Original position in the alphabet (1-based)
Returns
Int: New position after applying the transformation (1-based)
Stream API
fit! OnlineStatsBase._fit!
ClassicCiphers.Ciphers.AbstractStreamCipher — TypeAbstractStreamCipher{T} <: OnlineStat{T}Abstract type representing a stream cipher that implements the OnlineStat API.
This type serves as a base for implementing stream ciphers that process data sequentially using the online statistics framework. The type parameter T specifies the type of data being processed by the cipher.
Type Parameters
T: The type of data being processed by the cipher
ClassicCiphers.Ciphers.connect! — Functionconnect!(cipher2::C2, cipher1::C1) where {C2<:AbstractStreamCipher, C1<:AbstractStreamCipher}Connect two stream ciphers, allowing the output of cipher1 to be sent as input to cipher2.
Comment
Be sure to call this function before using the ciphers to ensure proper data flow. By connecting ciphers, you can create complex cipher chains and data processing pipelines. But be careful to avoid circular dependencies or infinite loops.
ToDo: using a DAG (Directed Acyclic Graph) to manage the connections should be considered for more complex scenarios.
Consider following discussion: https://github.com/joshday/OnlineStats.jl/issues/272 about OnlineStat chaining
ClassicCiphers.Ciphers.fit_listeners! — Functionfit_listeners!(cipher::O) where {O<:AbstractStreamCipher}Initialize and attach any required listeners to the given stream cipher implementation. This function should be called before using the cipher to ensure proper event handling.
Arguments
cipher::O: A stream cipher instance that implements the AbstractStreamCipher interface
Returns
Nothing. Modifies the cipher object in place.
Note
This is an internal function used to set up event handling for stream ciphers. Specific cipher implementations may override this method to add custom listeners.
Cipher specifics
Substitution
ClassicCiphers.Ciphers.SubstitutionCipher — TypeSubstitutionCipher{ENC} <: AbstractStreamCipherConfiguration{ENC}General substitution cipher that maps each character to another using a provided mapping.
Type parameters
ENC::Bool: true for encryption, false for decryption
Fields
mapping::Dict{Char,Char}: Character substitution mappingalphabet_params::AlphabetParameters: Configuration for alphabet and case handling
Caesar
ClassicCiphers.Ciphers.CaesarCipher — TypeCaesarCipher{ENC} <: AbstractStreamCipherConfiguration{ENC}Implementation of the Caesar cipher that shifts each letter by a fixed amount.
Type parameters
ENC::Bool: true for encryption, false for decryption
Fields
shift::Int: Number of positions to shift letters in the alphabetalphabet_params::AlphabetParameters: Configuration for alphabet and case handling
ROT13
ClassicCiphers.Ciphers.ROT13Cipher — TypeROT13Cipher{ENC} <: AbstractStreamCipherConfiguration{ENC}ROT13 substitution cipher that shifts each letter by 13 positions.
A special case of the Caesar cipher with a fixed shift of 13, making it self-inverse (applying the cipher twice returns the original text).
Type parameters
ENC::Bool: true for encryption, false for decryption
Fields
alphabet_params::AlphabetParameters: Configuration for alphabet and case handling
Affine
ClassicCiphers.Ciphers.AffineCipher — TypeAffineCipher{ENC} <: AbstractStreamCipherConfiguration{ENC}Implementation of the Affine cipher that applies the transformation E(x) = (ax + b) mod m where m is the alphabet size, a and b are the key parameters.
Type parameters
ENC::Bool: true for encryption, false for decryption
Fields
a::Int: Multiplicative coefficient (must be coprime with alphabet size)b::Int: Shift amount like in Caesar cipheralphabet_params::AlphabetParameters: Configuration for alphabet and case handling
XOR
ClassicCiphers.Ciphers.XORCipher — TypeXORCipher{ENC, T} <: AbstractStreamCipherConfiguration{ENC}Implementation of a XOR cipher that performs a bitwise XOR operation between message and key.
Type parameters
ENC::Bool: true for encryption, false for decryptionT: Type of elements in the key vector
Fields
key::Vector{T}: The key used for XOR operation
Vigenere
ClassicCiphers.Ciphers.VigenereCipher — TypeVigenereCipher{ENC} <: AbstractStreamCipherConfiguration{ENC}Vigenère cipher implementation that uses a keyword to encrypt/decrypt text. Each letter in the keyword determines the shift amount for the corresponding position in the text.
Type parameters
ENC::Bool: true for encryption, false for decryption
Fields
key::String: Keyword used for encryption/decryptionalphabet_params::AlphabetParameters: Configuration for alphabet and case handling
ClassicCiphers.Ciphers.get_shift — Functionget_shift(cipher::VigenereCipher, pos::Int)Get the shift value for the Vigenère cipher at the specified position in the key.
Vernam
ClassicCiphers.Ciphers.VernamCipher — TypeVernamCipher{ENC} <: AbstractStreamCipherConfiguration{ENC}A structure representing the Vernam cipher, also known as the one-time pad.
The Vernam cipher is a symmetric stream cipher where each character of the plaintext is combined with a character from a random key stream using bitwise XOR operation. When used with a truly random key the same length as the message, it provides perfect secrecy.
Type Parameters
ENC: Encoding type parameter that specifies how the text should be encoded
Notes
- The key must be at least as long as the message to be encrypted
 - Each key should be used only once
 - The key should be truly random for perfect secrecy
 
See also: AbstractStreamCipherConfiguration
Codes
ClassicCiphers.Codes.MorseCode — TypeMorseCode{ENC} <: AbstractStreamCipherConfiguration{ENC}Implementation of the Morse code that converts between alphanumeric text and Morse code. Uses "/" as a word separator and " " between letters.
Type parameters
ENC::Bool: true for encoding to Morse, false for decoding from Morse
ToDo
- Add support for additional Morse code types
- International Morse code ITU-R M.1677-1
 - American Morse code
 - Continental Morse code
 - Navy Morse code
 - Tap code
 
 
Index
ClassicCiphers.AlphabetClassicCiphers.CiphersClassicCiphers.ClassicCiphersClassicCiphers.TraitsClassicCiphers.Alphabet.DIGITS_LETTERSClassicCiphers.Alphabet.LOWERCASE_LETTERSClassicCiphers.Alphabet.UPPERCASE_LETTERSClassicCiphers.AbstractCipherClassicCiphers.AbstractStreamCipherConfigurationClassicCiphers.Alphabet.AlphabetParametersClassicCiphers.Ciphers.AbstractCipherStateClassicCiphers.Ciphers.AbstractStreamCipherClassicCiphers.Ciphers.AffineCipherClassicCiphers.Ciphers.CaesarCipherClassicCiphers.Ciphers.EmptyCipherStateClassicCiphers.Ciphers.ROT13CipherClassicCiphers.Ciphers.SubstitutionCipherClassicCiphers.Ciphers.ValidCharCountClassicCiphers.Ciphers.VernamCipherClassicCiphers.Ciphers.VigenereCipherClassicCiphers.Ciphers.XORCipherClassicCiphers.Codes.MorseCodeClassicCiphers.Traits.CaseHandlerClassicCiphers.Traits.CipherTraitClassicCiphers.Traits.CipherTypeTraitClassicCiphers.Traits.InputCaseHandlerClassicCiphers.Traits.InputCaseHandlingTraitClassicCiphers.Traits.InputCaseModeClassicCiphers.Traits.OutputCaseHandlingTraitClassicCiphers.Traits.OutputCaseModeClassicCiphers.Traits.ShiftSubstitutionClassicCiphers.Traits.SubstitutionTraitClassicCiphers.Traits.SymbolHandlerClassicCiphers.Traits.UnknownSymbolHandlingTraitClassicCiphers.Traits.UnknownSymbolModeBase.invClassicCiphers.Ciphers.StateClassicCiphers.Ciphers.connect!ClassicCiphers.Ciphers.fit_listeners!ClassicCiphers.Ciphers.get_shiftClassicCiphers.Ciphers.transform_indexClassicCiphers.Traits.apply_caseClassicCiphers.Traits.case_sensitiveClassicCiphers.Traits.cccaseClassicCiphers.Traits.default_caseClassicCiphers.Traits.ignore_symbolClassicCiphers.Traits.is_cccaseClassicCiphers.Traits.is_defaultClassicCiphers.Traits.is_ignoreClassicCiphers.Traits.is_lowercaseClassicCiphers.Traits.is_preserveClassicCiphers.Traits.is_removeClassicCiphers.Traits.is_replaceClassicCiphers.Traits.is_uppercaseClassicCiphers.Traits.iscasesensitiveClassicCiphers.Traits.lowercase_caseClassicCiphers.Traits.not_case_sensitiveClassicCiphers.Traits.preserve_caseClassicCiphers.Traits.remove_symbolClassicCiphers.Traits.replace_symbolClassicCiphers.Traits.transform_symbolClassicCiphers.Traits.uppercase_case