diff options
author | Matthew Miller <matthew@millerti.me> | 2021-02-02 14:48:47 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2021-02-02 14:48:47 -0800 |
commit | 25dec97c0f7c395cf41616973e973bd08508af85 (patch) | |
tree | 30de846192fed476b9cb1fa9a058a96f1743f1be /packages/server/src/helpers/decodeAttestationObject.ts | |
parent | 406c20648cbfa6b6e47600065f0c8f7c8990d998 (diff) |
Return attestationObject as Buffer
Diffstat (limited to 'packages/server/src/helpers/decodeAttestationObject.ts')
-rw-r--r-- | packages/server/src/helpers/decodeAttestationObject.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/server/src/helpers/decodeAttestationObject.ts b/packages/server/src/helpers/decodeAttestationObject.ts index fd6ad21..362e8a0 100644 --- a/packages/server/src/helpers/decodeAttestationObject.ts +++ b/packages/server/src/helpers/decodeAttestationObject.ts @@ -6,11 +6,8 @@ import cbor from 'cbor'; * * @param base64AttestationObject Base64URL-encoded Attestation Object */ -export default function decodeAttestationObject( - base64AttestationObject: string, -): AttestationObject { - const toBuffer = base64url.toBuffer(base64AttestationObject); - const toCBOR: AttestationObject = cbor.decodeAllSync(toBuffer)[0]; +export default function decodeAttestationObject(attestationObject: Buffer): AttestationObject { + const toCBOR: AttestationObject = cbor.decodeAllSync(attestationObject)[0]; return toCBOR; } |