Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

advlib

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advlib - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

lib/ble/data/index.js~

46

lib/ble/data/index.js

@@ -11,3 +11,4 @@ /**

var txpower = require('./gap/txpower.js');
var slaveconnectionintervalrange = require('./gap/slaveconnectionintervalrange.js');
var slaveconnectionintervalrange =
require('./gap/slaveconnectionintervalrange.js');
var solicitation = require('./gap/solicitation.js');

@@ -20,7 +21,7 @@ var servicedata = require('./gap/servicedata.js');

/**
* Convert a raw Bluetooth Low Energy advertiser header into its meaningful
* Convert a raw Bluetooth Low Energy advertising packet into its meaningful
* parts.
* https://www.bluetooth.org/en-us/specification/assigned-numbers/generic-access-profile
* @param {string} payload The raw payload as a hexadecimal-string.
* @return {Object} Semantically meaningful advertiser header.
* @return {Object} Semantically meaningful advertising packet.
*/

@@ -33,3 +34,3 @@ function process(payload) {

var length = (parseInt(payload.substr(cursor,2),16) + 1) * 2;
var tag = payload.substr(cursor+2,2);
var tag = payload.substr(cursor + 2, 2);
switch(tag) {

@@ -40,3 +41,3 @@ case("01"):

case("02"):
uuid.nonComplete16BitUUIDs.process(payload, cursor, advertiserData);
uuid.nonComplete16BitUUIDs(payload, cursor, advertiserData);
break;

@@ -47,6 +48,8 @@ case("03"):

case("04"):
genericdata.process(payload, cursor, advertiserData, "nonComplete32BitUUIDs");
genericdata.process(payload, cursor, advertiserData,
"nonComplete32BitUUIDs");
break;
case("05"):
genericdata.process(payload, cursor, advertiserData, "complete32BitUUIDs");
genericdata.process(payload, cursor, advertiserData,
"complete32BitUUIDs");
break;

@@ -72,15 +75,16 @@ case("06"):

case("0e"):
genericdata.process(payload, cursor, advertiserData, "simplePairingHashC");
genericdata.process(payload, cursor, advertiserData,
"simplePairingHashC");
break;
case("0f"):
genericdata.process(payload, cursor, advertiserData,
"simplePairingRandomizerR");
"simplePairingRandomizerR");
break;
case("10"):
genericdata.process(payload, cursor, advertiserData,
"securityManagerTKValue");
"securityManagerTKValue");
break;
case("11"):
genericdata.process(payload, cursor, advertiserData,
"securityManagerOOBFlags");
"securityManagerOOBFlags");
break;

@@ -94,3 +98,3 @@ case("12"):

case("15"):
solicitation.licitation128BitUUIDs(payload, cursor, advertiserData);(payload, cursor, advertiserData);
solicitation.solicitation128BitUUIDs(payload, cursor, advertiserData);
break;

@@ -102,7 +106,7 @@ case("16"):

genericdata.process(payload, cursor, advertiserData,
"publicTargetAddress");
"publicTargetAddress");
break;
case("18"):
genericdata.process(payload, cursor, advertiserData,
"randomTargetAddress");
"randomTargetAddress");
break;

@@ -114,7 +118,7 @@ case("19"):

genericdata.process(payload, cursor, advertiserData,
"advertisingInterval");
"advertisingInterval");
break;
case("1b"):
genericdata.process(payload, cursor, advertiserData,
"leBluetoothDeviceAddress");
"leBluetoothDeviceAddress");
break;

@@ -126,15 +130,15 @@ case("1c"):

genericdata.process(payload, cursor, advertiserData,
"simplePairingHashC256");
"simplePairingHashC256");
break;
case("1e"):
genericdata.process(payload, cursor, advertiserData,
"simplePairingRandomizerR256");
"simplePairingRandomizerR256");
break;
case("1f"):
genericdata.process(payload, cursor, advertiserData,
"solicitation32BitUUIDs");
"solicitation32BitUUIDs");
break;
case("3d"):
genericdata.process(payload, cursor, advertiserData,
"informationData3D");
"informationData3D");
break;

@@ -152,2 +156,2 @@ case("ff"):

module.exports.process = process;
module.exports.process = process;

@@ -13,3 +13,3 @@ {

],
"version": "0.0.2",
"version": "0.0.3",
"engines": {

@@ -16,0 +16,0 @@ "node": "^0.10.0"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc