summaryrefslogtreecommitdiffhomepage
path: root/src/assertion/parseAssertionAuthData.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-20 08:44:12 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-20 08:44:12 -0700
commit2c51287bec3592ebf7d40d886c41da8fb51cbc21 (patch)
tree603ec65541ea461cbe78c198c34574238eebd10a /src/assertion/parseAssertionAuthData.ts
parentd9074ec54935aa2155151d2dd9dea0974f33da29 (diff)
Initialize lerna project and move code to `server`
Diffstat (limited to 'src/assertion/parseAssertionAuthData.ts')
-rw-r--r--src/assertion/parseAssertionAuthData.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/assertion/parseAssertionAuthData.ts b/src/assertion/parseAssertionAuthData.ts
deleted file mode 100644
index e6aa011..0000000
--- a/src/assertion/parseAssertionAuthData.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { ParsedAssertionAuthData } from "@libTypes";
-
-/**
- * Make sense of the authData buffer contained in an Assertion
- */
-export default function parseAssertionAuthData(authData: Buffer): ParsedAssertionAuthData {
- let intBuffer = authData;
-
- const rpIdHash = intBuffer.slice(0, 32);
- intBuffer = intBuffer.slice(32);
-
- const flagsBuf = intBuffer.slice(0, 1);
- intBuffer = intBuffer.slice(1);
-
- const flags = flagsBuf[0];
- const counterBuf = intBuffer.slice(0, 4);
- intBuffer = intBuffer.slice(4);
-
- const counter = counterBuf.readUInt32BE(0);
-
- return {
- rpIdHash,
- flagsBuf,
- flags,
- counter,
- counterBuf,
- };
-}