Skip to content

Commit

Permalink
use buffer from globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
felipefdl committed Apr 29, 2024
1 parent a78af96 commit aecf0ab
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/lib/LoraPacket.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { reverseBuffer, asHexString } from "./util";
import { decrypt, decryptJoin, decryptFOpts } from "./crypto";
import { recalculateMIC } from "./mic";
import { Buffer } from "buffer";

enum MType {
JOIN_REQUEST = 0,
Expand Down
3 changes: 1 addition & 2 deletions src/lib/crypto.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import LoraPacket, { LorawanVersion } from "./LoraPacket";
import LoraPacket from "./LoraPacket";
import { reverseBuffer } from "./util";
import CryptoJS from "crypto-js";
import { Buffer } from "buffer";

const LORAIV = CryptoJS.enc.Hex.parse("00000000000000000000000000000000");

Expand Down
1 change: 0 additions & 1 deletion src/lib/mic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import LoraPacket, { LorawanVersion } from "./LoraPacket";
import { reverseBuffer } from "./util";

import { AesCmac } from "aes-cmac";
import { Buffer } from "buffer";

// calculate MIC from payload
function calculateMIC(
Expand Down

0 comments on commit aecf0ab

Please sign in to comment.