Skip to content

Commit

Permalink
docs: Make crypto_core.h appear on doxygen.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Feb 5, 2022
1 parent 96814c4 commit d39f803
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 97 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/cmake-linux
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ cmake -B_build -H. -GNinja \
cmake --build _build --parallel "$NPROC" --target install -- -k 0

cd _build # pushd
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6 ||
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
cd - # popd
3 changes: 2 additions & 1 deletion .github/scripts/cmake-osx
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ cmake -B_build -H. \

cd _build # pushd
make "-j$NPROC" -k install
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6 ||
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
cd - # popd
1 change: 1 addition & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ branches:
- "docker-bootstrap-node-websocket"
- "docker-toxcore-js"
- "mypy"
- "netlify/c-toxcore/deploy-preview"
- "sonar-scan"

# Labels specific to c-toxcore.
Expand Down
2 changes: 1 addition & 1 deletion .doxygen.conf → docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = DOXYGEN_SKIP
PREDEFINED = DOXYGEN_IGNORE

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ command = """\
else \
git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git;
fi && \
doxygen .doxygen.conf \
doxygen docs/Doxyfile \
"""
publish = "_docs/html"
6 changes: 3 additions & 3 deletions other/docker/doxygen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ RUN apk add --no-cache doxygen git graphviz \
&& git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git /work/doxygen-awesome-css
WORKDIR /work
COPY . /work/
RUN cat .doxygen.conf > doxygen.conf \
&& echo "WARN_AS_ERROR = YES" >> doxygen.conf \
&& doxygen doxygen.conf
RUN cat docs/Doxyfile > Doxyfile \
&& echo "WARN_AS_ERROR = YES" >> Doxyfile \
&& doxygen Doxyfile

FROM nginx:alpine
COPY --from=build /work/_docs/html/ /usr/share/nginx/html/
4 changes: 2 additions & 2 deletions toxav/toxav.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2013-2015 Tox project.
*/

/** @file toxav.h
/** @file
* @brief Public audio/video API for Tox clients.
*
* This API can handle multiple calls. Each call has its state, in very rare
Expand Down Expand Up @@ -832,7 +832,7 @@ bool toxav_groupchat_av_enabled(Tox *tox, uint32_t groupnumber);
#endif

//!TOKSTYLE-
#ifdef DOXYGEN_IGNORE
#ifndef DOXYGEN_IGNORE

typedef Toxav_Err_Call TOXAV_ERR_CALL;
typedef Toxav_Err_New TOXAV_ERR_NEW;
Expand Down
19 changes: 0 additions & 19 deletions toxcore/crypto_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ bool public_key_valid(const uint8_t *public_key)
return 1;
}

/**
* Fast encrypt/decrypt operations. Use if this is not a one-time communication.
* encrypt_precompute does the shared-key generation once so it does not have
* to be performed on every encrypt/decrypt.
*/
int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key,
uint8_t *shared_key)
{
Expand Down Expand Up @@ -320,10 +315,6 @@ int32_t decrypt_data(const uint8_t *public_key, const uint8_t *secret_key, const
return ret;
}

/**
* Increment the given nonce by 1 in big endian (rightmost byte incremented
* first).
*/
void increment_nonce(uint8_t *nonce)
{
/* TODO(irungentoo): use `increment_nonce_number(nonce, 1)` or
Expand All @@ -343,10 +334,6 @@ void increment_nonce(uint8_t *nonce)
}
}

/**
* Increment the given nonce by a given number. The number should be in host
* byte order.
*/
void increment_nonce_number(uint8_t *nonce, uint32_t increment)
{
/* NOTE don't use breaks inside this loop
Expand All @@ -369,17 +356,11 @@ void increment_nonce_number(uint8_t *nonce, uint32_t increment)
}
}

/**
* Fill the given nonce with random bytes.
*/
void random_nonce(uint8_t *nonce)
{
random_bytes(nonce, crypto_box_NONCEBYTES);
}

/**
* Fill a key CRYPTO_SYMMETRIC_KEY_SIZE big with random bytes.
*/
void new_symmetric_key(uint8_t *key)
{
random_bytes(key, CRYPTO_SYMMETRIC_KEY_SIZE);
Expand Down

0 comments on commit d39f803

Please sign in to comment.