Move the sha256 tool into its own directory, as it isn't specific to docker_build.

PiperOrigin-RevId: 153508081
diff --git a/tools/BUILD b/tools/BUILD
index 3923626..97b160e 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -12,6 +12,7 @@
         "//tools/build_defs/apple:srcs",
         "//tools/build_defs/apple/test:srcs",
         "//tools/build_defs/docker:srcs",
+        "//tools/build_defs/hash:srcs",
         "//tools/build_defs/pkg:srcs",
         "//tools/build_defs/repo:srcs",
         "//tools/build_rules:srcs",
diff --git a/tools/build_defs/docker/BUILD b/tools/build_defs/docker/BUILD
index 4aa6b03..1b45f02 100644
--- a/tools/build_defs/docker/BUILD
+++ b/tools/build_defs/docker/BUILD
@@ -115,12 +115,6 @@
 )
 
 py_binary(
-    name = "sha256",
-    srcs = ["sha256.py"],
-    visibility = ["//visibility:public"],
-)
-
-py_binary(
     name = "create_image",
     srcs = ["create_image.py"],
     visibility = ["//visibility:public"],
diff --git a/tools/build_defs/docker/build.bzl b/tools/build_defs/docker/build.bzl
index 5dc38c8..c969ac1 100644
--- a/tools/build_defs/docker/build.bzl
+++ b/tools/build_defs/docker/build.bzl
@@ -17,7 +17,8 @@
      tar_filetype="tar",
      deb_filetype="deb",
      docker_filetype="docker")
-load(":hash.bzl", _hash_tools="tools", _sha256="sha256")
+load("//tools/build_defs/hash:hash.bzl",
+     _hash_tools="tools", _sha256="sha256")
 load(":label.bzl", _string_to_label="string_to_label")
 load(":layers.bzl",
      _assemble_image="assemble",
diff --git a/tools/build_defs/hash/BUILD b/tools/build_defs/hash/BUILD
new file mode 100644
index 0000000..878ce00
--- /dev/null
+++ b/tools/build_defs/hash/BUILD
@@ -0,0 +1,18 @@
+licenses(["notice"])  # Apache 2.0
+
+filegroup(
+    name = "srcs",
+    srcs = glob(["**"]),
+    visibility = ["//tools:__pkg__"],
+)
+
+exports_files(
+    ["README.md"],
+    visibility = ["//site:__pkg__"],
+)
+
+py_binary(
+    name = "sha256",
+    srcs = ["sha256.py"],
+    visibility = ["//visibility:public"],
+)
diff --git a/tools/build_defs/docker/hash.bzl b/tools/build_defs/hash/hash.bzl
similarity index 94%
rename from tools/build_defs/docker/hash.bzl
rename to tools/build_defs/hash/hash.bzl
index 5d3b52c..6274154 100644
--- a/tools/build_defs/docker/hash.bzl
+++ b/tools/build_defs/hash/hash.bzl
@@ -27,7 +27,7 @@
 
 tools = {
     "sha256": attr.label(
-        default=Label("//tools/build_defs/docker:sha256"),
+        default=Label("//tools/build_defs/hash:sha256"),
         cfg="host",
         executable=True,
         allow_files=True)
diff --git a/tools/build_defs/docker/sha256.py b/tools/build_defs/hash/sha256.py
similarity index 100%
rename from tools/build_defs/docker/sha256.py
rename to tools/build_defs/hash/sha256.py