This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto'); | |
const MAX_TIMESTAMP = 0xffffff; | |
const MAX_SESSION_CTR = 0xff; | |
const MAX_USE_CTR = 0x7fff; | |
class Token { | |
#privateId = null; | |
#secretKey = null; | |
#publicId = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After the example from https://github.com/KhaosT/HAP-NodeJS/commit/80cdb1535f5bee874cc06657ef283ee91f258815 | |
import { Service } from 'homebridge'; | |
import Platform, { DevicePlatformAccessory } from '../../platform'; | |
import Accessory from '../../types/Accessory'; | |
export default class NFCDoorAccessory implements Accessory { | |
private get Characteristic() { | |
return this.platform.Characteristic; |