<commit_before>/* -*- mode:C; c-file-style: "bsd" -*- */
/*****************************************************************************************
**											**
**		Y K D E F  -  Common Yubikey project header				**
**											**
**	Date		/ Rev		/ Sign	/ Remark				**
**	06-06-03	/ 0.9.0		/ J E	/ Main					**
**	06-08-25	/ 1.0.0		/ J E	/ Rewritten for final spec		**
**	08-06-03	/ 1.3.0		/ J E	/ Added static OTP feature		**
**	09-06-02	/ 2.0.0		/ J E	/ Added version 2 flags			**
**	09-09-23	/ 2.1.0		/ J E	/ Added version 2.1 flags (OATH-HOTP)	**
**	10-05-01	/ 2.2.0		/ J E	/ Added support for 2.2 ext. + frame	**
**	11-04-15	/ 2.3.0		/ J E	/ Added support for 2.3 extensions	**
**	11-12-05	/ 2.4.0		/ J E	/ Added support for NFC and NDEF	**
**	12-10-28    / 3.0.0     / J E   / NEO changes                                   **
**											**
*****************************************************************************************/

#ifndef	__YKDEF_H_INCLUDED__
#define	__YKDEF_H_INCLUDED__

/* We need the structures defined here to be packed byte-wise */
#if defined(_WIN32) || defined(__GNUC__)
#pragma pack(push, 1)
#endif

/* Slot entries */

#define	SLOT_CONFIG		1   /* First (default / V1) configuration */
#define	SLOT_NAV		2   /* V1 only */
#define	SLOT_CONFIG2		3   /* Second (V2) configuration */
#define	SLOT_UPDATE1		4   /* Update slot 1 */
#define	SLOT_UPDATE2		5   /* Update slot 2 */
#define	SLOT_SWAP		6   /* Swap slot 1 and 2 */
#define	SLOT_NDEF		8   /* Write NDEF record */
#define	SLOT_NDEF2		9   /* Write NDEF record for slot 2 */

#define SLOT_USB_MODE		0x0b    /* USB mode of operation (NEO) */

#define SLOT_DEVICE_SERIAL	0x10	/* Device serial number */
#define SLOT_DEVICE_CONFIG	0x11	/* Write device configuration record */
#define SLOT_SCAN_MAP		0x12	/* Write scancode map */

#define SLOT_CHAL_OTP1		0x20	/* Write 6 byte challenge to slot 1, get Yubico OTP response */
#define SLOT_CHAL_OTP2		0x28	/* Write 6 byte challenge to slot 2, get Yubico OTP response */

#define SLOT_CHAL_HMAC1		0x30	/* Write 64 byte challenge to slot 1, get HMAC-SHA1 response */
#define SLOT_CHAL_HMAC2		0x38	/* Write 64 byte challenge to slot 2, get HMAC-SHA1 response */

#define RESP_ITEM_MASK		0x07	/* Mask for slice item # in responses */
<commit_msg>USB_MODE ended up as DEVICE_CONFIG<commit_after>/* -*- mode:C; c-file-style: "bsd" -*- */
/*****************************************************************************************
**											**
**		Y K D E F  -  Common Yubikey project header				**
**											**
**	Date		/ Rev		/ Sign	/ Remark				**
**	06-06-03	/ 0.9.0		/ J E	/ Main					**
**	06-08-25	/ 1.0.0		/ J E	/ Rewritten for final spec		**
**	08-06-03	/ 1.3.0		/ J E	/ Added static OTP feature		**
**	09-06-02	/ 2.0.0		/ J E	/ Added version 2 flags			**
**	09-09-23	/ 2.1.0		/ J E	/ Added version 2.1 flags (OATH-HOTP)	**
**	10-05-01	/ 2.2.0		/ J E	/ Added support for 2.2 ext. + frame	**
**	11-04-15	/ 2.3.0		/ J E	/ Added support for 2.3 extensions	**
**	11-12-05	/ 2.4.0		/ J E	/ Added support for NFC and NDEF	**
**	12-10-28    / 3.0.0     / J E   / NEO changes                                   **
**											**
*****************************************************************************************/

#ifndef	__YKDEF_H_INCLUDED__
#define	__YKDEF_H_INCLUDED__

/* We need the structures defined here to be packed byte-wise */
#if defined(_WIN32) || defined(__GNUC__)
#pragma pack(push, 1)
#endif

/* Slot entries */

#define	SLOT_CONFIG		1   /* First (default / V1) configuration */
#define	SLOT_NAV		2   /* V1 only */
#define	SLOT_CONFIG2		3   /* Second (V2) configuration */
#define	SLOT_UPDATE1		4   /* Update slot 1 */
#define	SLOT_UPDATE2		5   /* Update slot 2 */
#define	SLOT_SWAP		6   /* Swap slot 1 and 2 */
#define	SLOT_NDEF		8   /* Write NDEF record */
#define	SLOT_NDEF2		9   /* Write NDEF record for slot 2 */

#define SLOT_DEVICE_SERIAL	0x10	/* Device serial number */
#define SLOT_DEVICE_CONFIG	0x11	/* Write device configuration record */
#define SLOT_SCAN_MAP		0x12	/* Write scancode map */

#define SLOT_CHAL_OTP1		0x20	/* Write 6 byte challenge to slot 1, get Yubico OTP response */
#define SLOT_CHAL_OTP2		0x28	/* Write 6 byte challenge to slot 2, get Yubico OTP response */

#define SLOT_CHAL_HMAC1		0x30	/* Write 64 byte challenge to slot 1, get HMAC-SHA1 response */
#define SLOT_CHAL_HMAC2		0x38	/* Write 64 byte challenge to slot 2, get HMAC-SHA1 response */

#define RESP_ITEM_MASK		0x07	/* Mask for slice item # in responses */

{'fraction_non_alphanumeric': 0.1998221827072683, 'fraction_numerical': 0.0675705712380529, 'mean_word_length': 2.611556982343499, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5166769', 'n_tokens_mistral': 1953, 'n_tokens_neox': 1718, 'n_words': 508}