Package org.openrewrite
Class Checksum
java.lang.Object
org.openrewrite.Checksum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SourceFile
checksum
(SourceFile sourceFile, @Nullable String algorithm, ExecutionContext ctx) static Checksum
static Checksum
fromUri
(HttpSender httpSender, URI uri) Interprets the URI as pointing to a UTF-8 encoded text file which contains only a base-16 number representing a checksum.static Checksum
fromUri
(HttpSender httpSender, URI uri, String algorithm) static SourceFile
md5
(SourceFile sourceFile, ExecutionContext ctx) static SourceFile
sha256
(SourceFile sourceFile, ExecutionContext ctx)
-
Constructor Details
-
Checksum
public Checksum()
-
-
Method Details
-
getHexValue
-
fromHex
-
fromUri
Interprets the URI as pointing to a UTF-8 encoded text file which contains only a base-16 number representing a checksum. The ending of the URL is used to determine the algorithm that should be used. -
fromUri
-
md5
-
sha256
-
checksum
public static SourceFile checksum(SourceFile sourceFile, @Nullable @Nullable String algorithm, ExecutionContext ctx)
-