blob: d04a3458a8535d60f27641b5ad502af3e8980a61 [file]
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "salt_generator",
srcs = ["salt_generator.cc"],
hdrs = ["salt_generator.h"],
deps = [
"@abseil-cpp//absl/base:no_destructor",
"@abseil-cpp//absl/status:statusor",
],
)
cc_library(
name = "random_salt_generator",
srcs = ["random_salt_generator.cc"],
hdrs = ["random_salt_generator.h"],
deps = [
":salt_generator",
"@abseil-cpp//absl/base:no_destructor",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@boringssl//:crypto",
],
)
cc_test(
name = "random_salt_generator_test",
srcs = ["random_salt_generator_test.cc"],
deps = [
":random_salt_generator",
":salt_generator",
"@abseil-cpp//absl/container:flat_hash_set",
"@abseil-cpp//absl/status:status_matchers",
"@abseil-cpp//absl/status:statusor",
"@googletest//:gtest_main",
],
)