Package org.cyclonedx.util
Class BomUtils
- java.lang.Object
-
- org.cyclonedx.util.BomUtils
-
public final class BomUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateBomUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.List<Hash>calculateHashes(java.io.File file, Version schemaVersion)Calculates the hashes of the specified file.private static Hash.AlgorithmtoAlgorithm(java.security.MessageDigest digest)static booleanvalidateUriString(java.lang.String uri)static booleanvalidateUrlString(java.lang.String url)Deprecated.
-
-
-
Method Detail
-
calculateHashes
public static java.util.List<Hash> calculateHashes(java.io.File file, Version schemaVersion) throws java.io.IOException
Calculates the hashes of the specified file.- Parameters:
file- the File to calculate hashes onschemaVersion- enum denoting the schema version in use. Affects hash algorithm selection.- Returns:
- a List of Hash objets
- Throws:
java.io.IOException- an IOException- Since:
- 1.0.0
-
toAlgorithm
private static Hash.Algorithm toAlgorithm(java.security.MessageDigest digest)
-
validateUrlString
@Deprecated public static boolean validateUrlString(java.lang.String url)
Deprecated.
-
validateUriString
public static boolean validateUriString(java.lang.String uri)
-
-