Partager via


SymmetricKeyAttestation Class

public class SymmetricKeyAttestation
extends Attestation

Representation of a single Device Provisioning Service Symmetric Key Attestation.

The provisioning service supports Symmetric Key attestation as the device attestation mechanism. User can auto-generate the Primary and Secondary keys, or provide the values in Base64 format.

Constructor Summary

Constructor Description
SymmetricKeyAttestation(SymmetricKeyAttestation symmetricKeyAttestation)

CONSTRUCTOR (COPY)

SymmetricKeyAttestation(String primaryKey, String secondaryKey)

CONSTRUCTOR

Method Summary

Modifier and Type Method and Description
java.lang.String getPrimaryKey()

Getter for the primaryKey.

java.lang.String getSecondaryKey()

Getter for the secondaryKey.

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

SymmetricKeyAttestation

public SymmetricKeyAttestation(SymmetricKeyAttestation symmetricKeyAttestation)

CONSTRUCTOR (COPY)

This function will create a new instance of the Symmetric Key attestation copying the primaryKey and secondaryKey from the provided attestation.

Parameters:

symmetricKeyAttestation - the original SymmetricKeyAttestation to copy. If null, the service will generate the primary and secondary keys.

SymmetricKeyAttestation

public SymmetricKeyAttestation(String primaryKey, String secondaryKey)

CONSTRUCTOR

This function will create a new instance of the Symmetric Key attestation with primary and secondary keys. Both the keys are mandatory.

Parameters:

primaryKey - the String with the Symmetric Key attestation primary key. If null, the service will generate the primary key.
secondaryKey - the String with the Symmetric Key attestation secondary key. if null, the service will generate the secondary key.

Method Details

getPrimaryKey

public String getPrimaryKey()

Getter for the primaryKey.

Returns:

The String with the stored primaryKey.

getSecondaryKey

public String getSecondaryKey()

Getter for the secondaryKey.

Returns:

The String with the stored secondaryKey.

Applies to