HttpHsmSignatureProvider Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.device.hsm.HttpHsmSignatureProvider

Implements

public class HttpHsmSignatureProvider
implements SignatureProvider

Provides a means to sign data for authentication purposes

Constructor Summary

Constructor Description
HttpHsmSignatureProvider(String providerUri, String apiVersion)

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

Method Summary

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

Sign the provided data using the provided key name

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

HttpHsmSignatureProvider

public HttpHsmSignatureProvider(String providerUri, String apiVersion)

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

Throws:

java.net.URISyntaxException - if the provided uri cannot be parsed
java.security.NoSuchAlgorithmException - if the provided uri cannot be parsed

Method Details

sign

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

Sign the provided data using the provided key name

Parameters:

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

Returns:

the signed data

Throws:

java.io.IOException - If the http client cannot reach the signing party
TransportException - If the http client cannot reach the signing party
java.net.URISyntaxException - If the http client cannot reach the signing party
HsmException - If the http client cannot reach the signing party

Applies to