aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2022-04-29 23:18:53 -0800
committerDavid M. Syzdek <david@syzdek.net>2022-04-30 22:48:37 -0800
commit46033c20f3bd6afc8222910d45d8d6733359a782 (patch)
treec1e7653e6f11b3014fcf95b1810b7cf0a82bf3e5 /include
parent8621fe0dd127599f0a1b91b654b470a4c73c12cf (diff)
downloadtinytac-46033c20f3bd6afc8222910d45d8d6733359a782.tar.gz
tinytac-46033c20f3bd6afc8222910d45d8d6733359a782.tar.bz2
tinytac-46033c20f3bd6afc8222910d45d8d6733359a782.tar.xz
tinytac-46033c20f3bd6afc8222910d45d8d6733359a782.zip
libtinytac: adding tinytac_pckt_obfuscate()
Diffstat (limited to 'include')
-rw-r--r--include/tinytac.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/tinytac.h b/include/tinytac.h
index 106a71e..ee32c8d 100644
--- a/include/tinytac.h
+++ b/include/tinytac.h
@@ -220,4 +220,20 @@ tinytac_pckt_md5pad(
220 uint8_t * md5pad_prev, 220 uint8_t * md5pad_prev,
221 uint8_t * md5pad ); 221 uint8_t * md5pad );
222 222
223
224/// obfuscate or unobfuscate packet using shared secret key
225///
226/// @param[in] pckt packet used to generate psuedo-random pad
227/// @param[in] key shared secret key used to protect the communication
228/// @param[in] key_len length of shared secret key
229/// @param[in] unencrypted packet should not be obfuscated (TTAC_YES or TTAC_NO)
230///
231/// @return Returns 0 on success or -1 on error.
232_TINYTAC_F int
233tinytac_pckt_obfuscate(
234 tinytac_pckt_t * pckt,
235 char * key,
236 size_t key_len,
237 unsigned unencrypted );
238
223#endif /* end of header */ 239#endif /* end of header */