Module crypt.data

Class CryptoAlgorithm

java.lang.Object
io.github.astrapi69.crypt.data.algorithm.CryptoAlgorithm
All Implemented Interfaces:
io.github.astrapi69.crypt.api.algorithm.Algorithm

public class CryptoAlgorithm extends Object implements io.github.astrapi69.crypt.api.algorithm.Algorithm
The class CryptoAlgorithm provides factory method for create an algorithm from string for encryption or decryption.
  • Field Summary

    Fields inherited from interface io.github.astrapi69.crypt.api.algorithm.Algorithm

    UNKNOWN_ALGORITHM_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name of this algorithm
    static io.github.astrapi69.crypt.api.algorithm.Algorithm
    newAlgorithm(@NonNull String algorithm)
    Factory method for creating a new Algorithm from the given string algorithm

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.github.astrapi69.crypt.api.algorithm.Algorithm

    getAlgorithm
  • Method Details

    • newAlgorithm

      public static io.github.astrapi69.crypt.api.algorithm.Algorithm newAlgorithm(@NonNull @NonNull String algorithm)
      Factory method for creating a new Algorithm from the given string algorithm
      Parameters:
      algorithm - the algorithm
      Returns:
      the new Algorithm
    • name

      public String name()
      Gets the name of this algorithm
      Returns:
      the name of this algorithm