add naming section

This commit is contained in:
blek 2024-01-03 13:43:49 +10:00
parent f086bb27a0
commit 753419b3a7
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 10 additions and 0 deletions

10
SPEC.md
View File

@ -13,6 +13,16 @@ This document also uses the following terminology:
| SHA256(x) | An `x` value hashed via the SHA256 hashing function. | | SHA256(x) | An `x` value hashed via the SHA256 hashing function. |
| base64 | The base64 data encoding format, which is described in [RFC4648](https://www.rfc-editor.org/rfc/rfc4648) | | base64 | The base64 data encoding format, which is described in [RFC4648](https://www.rfc-editor.org/rfc/rfc4648) |
# NAMING
This section is more of a convention rather than a requirement.
blek! AES can be written as `baes` or `b-aes`, non-case sensitive.
Recommendations for implementations:
1. Name the blek! AES class or namespace `bAes`, `b_aes`, `BAes`, `B_AES` in camel case, snake case, pascal case and constant case.
2. If the implementation is in a function based language like C, prefix the functions with `baes_`.
# 1. File format # 1. File format
The file is a serialized array of strings encoded with either JSON or CBOR. The filename MUST end with either `.json` or `.cbor` extension to clarify the encoding. The file is a serialized array of strings encoded with either JSON or CBOR. The filename MUST end with either `.json` or `.cbor` extension to clarify the encoding.
If there is no filename available in a specific context (like a multipart form), it MUST be indicated via something else, like HTTP's `Content-Type` header. If there is no filename available in a specific context (like a multipart form), it MUST be indicated via something else, like HTTP's `Content-Type` header.