Skip to content

Overview

The CrypTagDecoder verifies and decodes the SDM values a tag mirrors into its URL or text record — pure JavaScript, no hardware. Construct it with the keys that match the tag, then call the decode method for the SDM profile.

import { CrypTagDecoder } from 'cryptag';
const decoder = new CrypTagDecoder({
keyList: {
'2': { masterKey: '00000000000000000000000000000000' },
'3': { masterKey: '00000000000000000000000000000000' },
},
sdmSettings: { sdmMetaRead: 2, sdmFileRead: 3 },
});
  • Construction — create a decoder with keys and SDM settings.
  • Configuration — inspect and update keys and parameters.
  • DecodingdecodePlain / decodeEncrypted / decodeFull.

Every decode returns the unified result; success: true only means the decode ran — authenticity is result.data.cmacValid, so always check it. For result shapes and error codes, see Concepts.