TextCodec class abstract

Core interface for all text codecs in the textcrypt package.

This abstract class defines the contract that all codecs must implement. Each codec provides encoding and decoding functionality for text transformation.

Example:

class MyCodec implements TextCodec {
  @override
  String encode(String input) {
    // Custom encoding logic
    return transformedInput;
  }

  @override
  String decode(String input) {
    // Custom decoding logic
    return originalInput;
  }
}
Implementers

Constructors

TextCodec.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
Returns the name/identifier of this codec.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(String input) String
Decodes the input string using the codec's specific algorithm.
encode(String input) String
Encodes the input string using the codec's specific algorithm.
isValidInput(String input) bool
Optional method to validate if input can be processed by this codec.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited