This package contains implementations of CharacterToCharacterCodecs

Values
rot13Source Codeshared rot13 rot13

A common case of the Caesar cipher, using a key of 13.

Functions
caesarMappingSource Codeshared Map<Character,Character> caesarMapping(Integer key)

Creates an encode mapping for Substitution that performs a Caesar cipher. This replaces each of the 26 characters of the basic latin alphabet with another of those characters, key places away from the original.

Both uppercase and lowercase letters are affected.

Parameters:
  • key

    The maxiumum offset is 25/-25, values of greater mangnitude than this are treated modulo 26.

Classes
SubstitutionSource Codeshared Substitution

A classic simple substitution cipher.

Any character found to be a key in the Substitution.encodeMapping/Substitution.decodeMapping is replaced with its corresponding item. Other characters are passed through without modification.

rot13Source Codeshared rot13

A common case of the Caesar cipher, using a key of 13.