Interface KmsCryptoAsync
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
KmsCryptoAsyncClient
@Generated(value="OracleSDKGenerator", comments="API Version: release") public interface KmsCryptoAsync extends AutoCloseable
Use the Key Management API to manage vaults and keys.For more information, see Managing Vaults and Managing Keys.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Future<DecryptResponse>
decrypt(DecryptRequest request, AsyncHandler<DecryptRequest,DecryptResponse> handler)
Decrypts data using the given DecryptDataDetails resource.Future<EncryptResponse>
encrypt(EncryptRequest request, AsyncHandler<EncryptRequest,EncryptResponse> handler)
Encrypts data using the given EncryptDataDetails resource.Future<ExportKeyResponse>
exportKey(ExportKeyRequest request, AsyncHandler<ExportKeyRequest,ExportKeyResponse> handler)
Exports a specific version of a master encryption key according to the details of the request.Future<GenerateDataEncryptionKeyResponse>
generateDataEncryptionKey(GenerateDataEncryptionKeyRequest request, AsyncHandler<GenerateDataEncryptionKeyRequest,GenerateDataEncryptionKeyResponse> handler)
Generates a key that you can use to encrypt or decrypt data.String
getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)void
refreshClient()
Rebuilds the client from scratch.void
setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).Future<SignResponse>
sign(SignRequest request, AsyncHandler<SignRequest,SignResponse> handler)
Creates a digital signature for a message or message digest by using the private key of a public-private key pair, also known as an asymmetric key.Future<VerifyResponse>
verify(VerifyRequest request, AsyncHandler<VerifyRequest,VerifyResponse> handler)
Verifies a digital signature that was generated by the Sign operation by using the public key of the same asymmetric key that was used to sign the data.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
refreshClient
void refreshClient()
Rebuilds the client from scratch.Useful to refresh certificates.
-
setEndpoint
void setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).- Parameters:
endpoint
- The endpoint of the serice.
-
getEndpoint
String getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)
-
decrypt
Future<DecryptResponse> decrypt(DecryptRequest request, AsyncHandler<DecryptRequest,DecryptResponse> handler)
Decrypts data using the given DecryptDataDetails resource.- Parameters:
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
encrypt
Future<EncryptResponse> encrypt(EncryptRequest request, AsyncHandler<EncryptRequest,EncryptResponse> handler)
Encrypts data using the given EncryptDataDetails resource.Plaintext included in the example request is a base64-encoded value of a UTF-8 string.
- Parameters:
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
exportKey
Future<ExportKeyResponse> exportKey(ExportKeyRequest request, AsyncHandler<ExportKeyRequest,ExportKeyResponse> handler)
Exports a specific version of a master encryption key according to the details of the request.For their protection, keys that you create and store on a hardware security module (HSM) can never leave the HSM. You can only export keys stored on the server. For export, the key version is encrypted by an RSA public key that you provide. This operation is not supported for keys having protection mode
EXTERNAL
.- Parameters:
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
generateDataEncryptionKey
Future<GenerateDataEncryptionKeyResponse> generateDataEncryptionKey(GenerateDataEncryptionKeyRequest request, AsyncHandler<GenerateDataEncryptionKeyRequest,GenerateDataEncryptionKeyResponse> handler)
Generates a key that you can use to encrypt or decrypt data.- Parameters:
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
sign
Future<SignResponse> sign(SignRequest request, AsyncHandler<SignRequest,SignResponse> handler)
Creates a digital signature for a message or message digest by using the private key of a public-private key pair, also known as an asymmetric key.To verify the generated signature, you can use the Verify operation. Or, if you want to validate the signature outside of the service, you can do so by using the public key of the same asymmetric key. This operation is not supported for keys having protection mode
EXTERNAL
.- Parameters:
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
verify
Future<VerifyResponse> verify(VerifyRequest request, AsyncHandler<VerifyRequest,VerifyResponse> handler)
Verifies a digital signature that was generated by the Sign operation by using the public key of the same asymmetric key that was used to sign the data.If you want to validate the digital signature outside of the service, you can do so by using the public key of the asymmetric key. This operation is not supported for keys having protection mode
EXTERNAL
.- Parameters:
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
-