Class BomUtils

java.lang.Object
org.cyclonedx.util.BomUtils

public final class BomUtils extends Object
  • Constructor Details

    • BomUtils

      private BomUtils()
  • Method Details

    • calculateHashes

      public static List<Hash> calculateHashes(File file, Version schemaVersion) throws IOException
      Calculates the hashes of the specified file.
      Parameters:
      file - the File to calculate hashes on
      schemaVersion - enum denoting the schema version in use. Affects hash algorithm selection.
      Returns:
      a List of Hash objets
      Throws:
      IOException - an IOException
      Since:
      1.0.0
    • toAlgorithm

      private static Hash.Algorithm toAlgorithm(MessageDigest digest)
    • validateUrlString

      @Deprecated public static boolean validateUrlString(String url)
      Deprecated.
    • validateUriString

      public static boolean validateUriString(String uri)