ScramService¶
Method | LwM2M request | Description |
---|---|---|
login | get /1024//40 alias: /scram/login |
Initiate scram login process |
loginProof | get /1024//41 alias: /scram/login-proof |
Scram login proof |
getHashIteration | get /1024//42 alias: /scram/hash-iteration |
Get scram hash iteration counter |
putHashIteration | put /1024//42 alias: /scram/hash-iteration |
Set scram hash iteration counter |
initialize | get /1024//47 alias: /scram/initialize |
Start encrypted communication |
stop | get /1024//46 alias: /scram/stop |
Stop encrypted communication |
send | get /1024//48 alias: /scram/com-send-receive |
Communication channel |
setInitializationVector | get /1024//45 alias: /scram/initialization-vector |
Exchange new Initialization Vectors |
sendWithIV | get /1024//44 alias: /scram/send-with-iv |
Communication channel with encryption initialization vectory |
login¶
Minimal Tap Firmware version: 1.0
Initiate scram login process
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
params | ScramLoginParams | optional |
Returns¶
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const params = ...;
const response = await tap.service.scram.login(params);
const value = response.body();
console.log(`login: ${value}`);
loginProof¶
Minimal Tap Firmware version: 1.0
Scram login proof
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
params | Uint8Array | optional |
Returns¶
Uint8Array
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const params = ...;
const response = await tap.service.scram.loginProof(params);
const value = response.body();
console.log(`loginProof: ${value}`);
getHashIteration¶
Minimal Tap Firmware version: 1.11
Get scram hash iteration counter
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.scram.getHashIteration();
const value = response.body();
console.log(`getHashIteration: ${value}`);
putHashIteration¶
Minimal Tap Firmware version: 1.11
Set scram hash iteration counter
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | number |
Returns¶
Nothing
Authorization¶
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.configurator.setupConfigMode();
const data = ...;
const response = await tap.service.scram.putHashIteration(data);
const value = response.body();
console.log(`putHashIteration: ${value}`);
initialize¶
Minimal Tap Firmware version: 1.11
Start encrypted communication
Parameters¶
This endpoint does not need any parameter.
Returns¶
Uint8Array
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.scram.initialize();
const value = response.body();
console.log(`initialize: ${value}`);
stop¶
Minimal Tap Firmware version: 1.11
Stop encrypted communication
Parameters¶
This endpoint does not need any parameter.
Returns¶
Uint8Array
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.scram.stop();
const value = response.body();
console.log(`stop: ${value}`);
send¶
Minimal Tap Firmware version: 1.11
Communication channel
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | Uint8Array |
Returns¶
Uint8Array
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const data = ...;
const response = await tap.service.scram.send(data);
const value = response.body();
console.log(`send: ${value}`);
setInitializationVector¶
Minimal Tap Firmware version: 1.85
Exchange new Initialization Vectors
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | Uint8Array | 16 bytes initialization vector |
Returns¶
Uint8Array
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const data = ...;
const response = await tap.service.scram.setInitializationVector(data);
const value = response.body();
console.log(`setInitializationVector: ${value}`);
sendWithIV¶
Minimal Tap Firmware version: 1.85
Communication channel with encryption initialization vectory
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | EncryptedIVRequest |
Returns¶
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const data = ...;
const response = await tap.service.scram.sendWithIV(data);
const value = response.body();
console.log(`sendWithIV: ${value}`);