SbomFileSupport class
The SBOM file support class. Provides convenience methods for file listings, SHA1 generation of file contents etc.
Constructors
- SbomFileSupport(String _topLevelPath)
- Construction
Properties
Methods
-
combinedDigest(
List< Digest> digests) → String - Get the combined SHA1 digest of a list of SHA1 digests. Returns the digest as a String which may be empty.
-
licenceFileContents(
) → String - Get the package licence file contents. Returns the licence file contents or empty if no licence file is found or an error occurs.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
packageDartFiles(
) → List< String> - Gets a list of Dart files in a package directory from the lib and bin directories. Returns a list of absolute file paths, empty if none found or an exception is raised.
-
packageVerificationCode(
) → String - Get the package verification code. This is generated from the SHA1 digests of a combination of all the dart files in the package with that of the pubspec.yaml file. The algorithm used is from section 3.9.4 of the SPDX 2.2 specification. Returns empty if the code cannot be generated.
-
sha1DigestAsBytes(
String path) → List< int> - Get the SHA1 digest of a supplied absolute file path as a list of bytes. Returns the digest or empty if it could not be calculated.
-
sha1DigestAsString(
String path) → String - Get the SHA1 digest of a supplied absolute file path as a string. Returns the digest or empty if it could not be calculated.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited