load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])

go_library(
    name = "keyset",
    srcs = [
        "binary_io.go",
        "handle.go",
        "json_io.go",
        "keyset.go",
        "manager.go",
        "mem_io.go",
        "reader.go",
        "validation.go",
        "writer.go",
    ],
    importpath = "github.com/google/tink/go/keyset",
    visibility = [
        "//visibility:public",
    ],
    deps = [
        "//core/primitiveset",
        "//core/registry",
        "//internal",
        "//proto/tink_go_proto",
        "//subtle/random",
        "//tink",
        "@org_golang_google_protobuf//encoding/protojson",
        "@org_golang_google_protobuf//encoding/prototext",
        "@org_golang_google_protobuf//proto",
    ],
)

go_test(
    name = "keyset_test",
    srcs = [
        "binary_io_test.go",
        "handle_test.go",
        "json_io_test.go",
        "manager_test.go",
        "validation_test.go",
    ],
    deps = [
        ":keyset",
        "//aead/subtle",
        "//mac",
        "//proto/common_go_proto",
        "//proto/tink_go_proto",
        "//subtle/random",
        "//testkeyset",
        "//testutil",
        "@org_golang_google_protobuf//proto",
    ],
)

alias(
    name = "go_default_library",
    actual = ":keyset",
    visibility = ["//visibility:public"],
)
