From e36f091b426345214b208040704b34ee4825951e Mon Sep 17 00:00:00 2001 From: bleichen Date: Tue, 5 Mar 2019 05:50:28 -0800 Subject: [PATCH] Making another doc file more? compatible. NOKEYCHECK=True PiperOrigin-RevId: 236832376 GitOrigin-RevId: 0548eea608460e635a820293a6d2100944addb12 --- doc/formats.md | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/doc/formats.md b/doc/formats.md index 379fbc1..f30a428 100644 --- a/doc/formats.md +++ b/doc/formats.md @@ -68,40 +68,27 @@ algorithm) Some data types that don't have an exact match in Json use a specific format as described below -| **Type** | **Representation** | -| :------- | :---------------------------------------------------------------- | -| HexBytes | This is an array of bytes represented as by hexadecimal string. | -| BigInt | An integer in hexadecimal representation using a twos complement | -: : representation and big-endian order. The integer is negative if : -: : the first byte is greater character is greater than 7. Examples\: : -: : 259\: "103", -192\: "f40", 0\: "0" : -| Asn | A hexadecimal encoded array of bytes. This may be a valid or | -: : invalid ASN encoding. : -| Der | A valid DER encoding represented as a hexadecimal string. | -| Pem | A valid PEM encoded key | +**Type** | **Representation** +:------- | :----------------- +HexBytes | This is an array of bytes represented as by hexadecimal string. +BigInt | An integer in hexadecimal representation using a twos complement representation and big-endian order. The integer is negative if the first byte is greater character is greater than 7. Examples: 259: "103", -192: "f40", 0: "0" +Asn | A hexadecimal encoded array of bytes. This may be a valid or invalid ASN encoding. +Der | A valid DER encoding represented as a hexadecimal string. +Pem | A valid PEM encoded key ## General format This is the format for a file with test vectors. -| **Field name** | **Type** | **Explanation** | -| :--------------- | :---------- | :------------------------------------------ | -| algorithm | str | The name of the algorithm | -| schema | str | The name of the JSON schema defining the | -: : : format of the test vectors. : -| generatorVersion | str | The version of the generator that generated | -: : : the test vectors. For releases this has the : -: : : format “major.minor”, where changes in the : -: : : format will be reflected by incrementing : -: : : major. : -| numberOfTests | int | the number of test cases in the test vector | -: : : file. : -| header | list of str | description of the file | -| notes | dictionary | A dictionary describing flags. (modified in | -: : : v. 0.3) : -| testGroups | list | a list of test groups. The format of the | -: : : test group depends on the algorithm that is : -: : : tested. : +**Field name** | **Type** | **Explanation** +:--------------- | :---------- | :-------------- +algorithm | str | The name of the algorithm +schema | str | The name of the JSON schema defining the format of the test vectors. +generatorVersion | str | The version of the generator that generated the test vectors. For releases this has the format “major.minor”, where changes in the format will be reflected by incrementing major. +numberOfTests | int | the number of test cases in the test vector file. +header | list of str | description of the file +notes | dictionary | A dictionary describing flags. (modified in v. 0.3) +testGroups | list | a list of test groups. The format of the test group depends on the algorithm that is tested. Example: