HttpHsmSignatureProvider Class

  • java.lang.Object

public class HttpHsmSignatureProvider implements SignatureProvider

Provides a means to sign data for authentication purposes

Constructor Summary

Constructor Description
HttpHsmSignatureProvider(String providerUri, String apiVersion, UnixDomainSocketChannel unixDomainSocketChannel)

Constructor for an HttpHsmSignatureProvider but using the non-default api version

Method Summary

Modifier and Type Method and Description
String sign(String keyName, String data, String generationId)

Sign the provided data using the provided key name

Constructor Details

HttpHsmSignatureProvider

public HttpHsmSignatureProvider(String providerUri, String apiVersion, UnixDomainSocketChannel unixDomainSocketChannel)

Constructor for an HttpHsmSignatureProvider but using the non-default api version

Parameters:

providerUri - the uri for the signing provider
apiVersion - the api version to call
unixDomainSocketChannel - the implementation of the UnixDomainSocketChannel interface that will be used if any unix domain socket communication is required. May be null if no unix domain socket communication is required.

Throws:

URISyntaxException - if the provided uri cannot be parsed
NoSuchAlgorithmException - if the default sign request algorithm cannot be used

Method Details

sign

public String sign(String keyName, String data, String generationId)

Sign the provided data using the provided key name

Overrides:

HttpHsmSignatureProvider.sign(String keyName, String data, String generationId)

Parameters:

keyName - the key used for signing
data - the data to be signed
generationId - the generation id

Returns:

the signed data

Applies to