New encode feature allows direct writing of byte string value (#137)
New features for UsefulBuf and for QCBOREncode allows direct writing to the output buffer. For QCBOREncode, this is the direct writing of the value of a byte string. This allows it to be written in chunks or be the output buffer of some function like symmetric encryption.
* fix grammer in security policy
* Half-way start a encoding feature to write byte string values into output
* Add documentation for OpenBstr
* UsefulBuf_Advance mostly working and testing
* OpenBytes() is mostly working and somewhat tested
* Finish up OpenBytes -- error handing, documentation...
Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/test/qcbor_encode_tests.h b/test/qcbor_encode_tests.h
index 69f694a..bac1085 100644
--- a/test/qcbor_encode_tests.h
+++ b/test/qcbor_encode_tests.h
@@ -1,6 +1,6 @@
/*==============================================================================
Copyright (c) 2016-2018, The Linux Foundation.
- Copyright (c) 2018-2021, Laurence Lundblade.
+ Copyright (c) 2018-2022, Laurence Lundblade.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,6 @@
- All the functions in qcbor_encode.h are called once in the aggregation of all
the tests below.
- - All the types that are supported are given as input and parsed by these tests
-
- - There is some hostile input such as invalid lengths and CBOR too complex
- and types this parser doesn't handle
-
*/
@@ -141,10 +136,11 @@
*/
int32_t AllAddMethodsTest(void);
+
/*
The binary string wrapping of maps and arrays used by COSE
*/
-int32_t BstrWrapTest(void);
+int32_t BstrWrapTest(void);
/*
@@ -190,5 +186,11 @@
int32_t QCBORHeadTest(void);
+/* Fully test QCBOREncode_OpenBytes(), QCBOREncode_CloseBytes()
+ * and friends.
+ */
+int32_t OpenCloseBytesTest(void);
+
+
#endif /* defined(__QCBOR__qcbor_encode_tests__) */