You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wscodec/encoder/pyencoder/c_encoder/pairhist.c
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -32,11 +32,17 @@
32
32
#defineMD5BLKLEN_BYTES 64 /*!< Length of the MD5 input message block in bytes. */
33
33
34
34
externnv_tnv;
35
+
externvoidfram_write_enable(void); /*!< Enable writes to FRAM. Should be defined in the processor-specific cuplTag project. */
36
+
externvoidfram_write_disable(void); /*!< Disable writes to FRAM. Should be defined in the processor-specific cuplTag project. */
37
+
38
+
#pragma PERSISTENT(pairhistory)
39
+
pair_tpairhistory[BUFLEN_PAIRS] = {0}; /*!< Array of unencoded pairs. This mirrors the circular buffer of base64 encoded pairs stored in EEPROM. */
40
+
41
+
#pragma PERSISTENT(cursorindex)
42
+
intcursorindex=-1; /*!< Index marking the end of the circular buffer. The most recent sample is stored here. The next index contains the oldest sample. */
35
43
36
44
unsigned charmsgblock[MD5BLKLEN_BYTES]; /*!< Block to hold message data as an input to the MD5 algorithm. */
37
45
constintbuflenpairs=BUFLEN_PAIRS; /*!< Length of the circular buffer in pairs. */
38
-
staticpair_tpairhistory[BUFLEN_PAIRS]; /*!< Array of unencoded pairs. This mirrors the circular buffer of base64 encoded pairs stored in EEPROM. */
39
-
staticintcursorindex=-1; /*!< Index marking the end of the circular buffer. The most recent sample is stored here. The next index contains the oldest sample. */
40
46
staticconstcharipadchar=0x36; /*!< Inner padding byte for HMAC as defined in <a href="https://tools.ietf.org/html/rfc2104#section-2">RFC 2104</a>.*/
41
47
staticconstcharopadchar=0x5C; /*!< Outer padding byte for HMAC as defined in <a href="https://tools.ietf.org/html/rfc2104#section-2">RFC 2104</a>. */
0 commit comments