Klasse Calc

java.lang.Object
de.srsoftware.tools.Calc

public class Calc extends Object
collection of tiny algorithms
  • Methodendetails

    • ggt

      public static long ggt(long a, long b)
      calculate the grates common divisor
      Parameter:
      a - first number
      b - second number
      Gibt zurück:
      greatest common divisor of a and b
    • sha256

      public static Optional<byte[]> sha256(Object o)
      calculate the sha256 hash of the objects string representation
      Parameter:
      o - the object to hash
      Gibt zurück:
      the hash value represented as byte array string