public class IotHiskDevice extends Object
| Constructor and Description |
|---|
IotHiskDevice(Device device)
Constructs a new hisk device client using the provided hisk device info.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] cipherMessage)
Decrypt cipher with device secure element.
|
byte[] |
encrypt(byte[] message)
Encrypt message with device secure element.
|
byte[] |
getActiveData()
Get device active data generated by device secure element
|
long |
getCurrentCounter()
Get device client current counter.
|
String |
getDeviceId()
Get unique device id in ascii encoding
|
void |
setCurrentCounter(long counter)
Set device counter by user specified counter.
|
public IotHiskDevice(Device device)
device - specified hisk basic device info, corresponding to the contract created in hisk cloud service.public String getDeviceId()
public byte[] getActiveData()
public byte[] encrypt(byte[] message)
message - plain message in byte arraypublic byte[] decrypt(byte[] cipherMessage)
cipherMessage - cipher message in byte arraypublic long getCurrentCounter()
public void setCurrentCounter(long counter)
counter - specified counterCopyright © 2023. All rights reserved.