Skip to content

Commit

Permalink
Remove deprecation annotation for KMS client registration.
Browse files Browse the repository at this point in the history
There are some valid use-cases for which we currently don't have a replacement. So it is better to wait with deprecation until we have a replacement.

Also, update the documentation for these functions.

PiperOrigin-RevId: 616759308
Change-Id: I1802a0d0e9c8f17f2fdd7fbdc843f30135701e9c
  • Loading branch information
juergw authored and copybara-github committed Mar 18, 2024
1 parent df0d837 commit 0b66132
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ public Aead getAead(String uri) throws GeneralSecurityException {
* <p>If {@code credentialPath} is present, load the credentials from that. Otherwise use the
* default credentials.
*
* @deprecated It is preferable to not register KMS clients. Instead, create the GcpKmsClient
* yourself and call {@link getAead} to get a remote {@code Aead}. Use this {@code Aead} to
* encrypt a keyset with {@code TinkProtoKeysetFormat.serializeEncryptedKeyset}, or to create
* an envelope {@code Aead} using {@code KmsEnvelopeAead.create}.
* <p>In many cases, it is not necessary to register the client. For example, you can create the
* GcpKmsClient yourself and call {@link GcpKmsClient#getAead} to get a remote {@code Aead}. Use
* this {@code Aead} to encrypt a keyset for with {@code
* TinkProtoKeysetFormat.serializeEncryptedKeyset}, or to create an envelope {@code Aead} using
* {@code KmsEnvelopeAead.create}.
*/
@Deprecated
public static void register(Optional<String> keyUri, Optional<String> credentialPath)
throws GeneralSecurityException {
GcpKmsClient client;
Expand Down

0 comments on commit 0b66132

Please sign in to comment.