1package(default_visibility = ["//visibility:public"]) 2 3licenses(["notice"]) 4 5java_binary( 6 name = "encrypted_keyset_example", 7 srcs = ["EncryptedKeysetExample.java"], 8 main_class = "encryptedkeyset.EncryptedKeysetExample", 9 deps = [ 10 "@tink_java//src/main/java/com/google/crypto/tink:aead", 11 "@tink_java//src/main/java/com/google/crypto/tink:key_templates", 12 "@tink_java//src/main/java/com/google/crypto/tink:registry_cluster", 13 "@tink_java//src/main/java/com/google/crypto/tink:tink_json_proto_keyset_format", 14 "@tink_java//src/main/java/com/google/crypto/tink/aead:aead_config", 15 "@tink_java//src/main/java/com/google/crypto/tink/aead:kms_aead_key_manager", 16 "@tink_java//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters", 17 "@tink_java//src/main/java/com/google/crypto/tink/integration/gcpkms:gcp_kms_client", 18 ], 19) 20 21# In order to run this test, use your own Cloud KMS key and credential. 22sh_test( 23 name = "encrypted_keyset_example_test", 24 size = "small", 25 srcs = ["encrypted_keyset_example_test.sh"], 26 args = [ 27 "$(rootpath :encrypted_keyset_example)", 28 # Change this to your key 29 "gcp-kms://projects/tink-test-infrastructure/locations/global/keyRings/unit-and-integration-testing/cryptoKeys/aead-key", 30 # Change this to your credential 31 "$(rootpath //testdata/gcp:credential.json)", 32 ], 33 data = [ 34 ":encrypted_keyset_example", 35 # Change this to your credential 36 "//testdata/gcp:credential.json", 37 ], 38 tags = [ 39 "manual", 40 "requires-network", 41 ], 42) 43