Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove logs & deadcode #31

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions app/src/blake2s/blake2.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,15 @@ typedef struct blake2sp_state__ {
} blake2sp_state;

BLAKE2_PACKED(struct blake2s_param__ {
uint8_t digest_length; /* 1 */
uint8_t key_length; /* 2 */
uint8_t fanout; /* 3 */
uint8_t depth; /* 4 */
uint32_t leaf_length; /* 8 */
uint32_t node_offset; /* 12 */
uint16_t xof_length; /* 14 */
uint8_t node_depth; /* 15 */
uint8_t inner_length; /* 16 */
/* uint8_t reserved[0]; */
uint8_t digest_length; /* 1 */
uint8_t key_length; /* 2 */
uint8_t fanout; /* 3 */
uint8_t depth; /* 4 */
uint32_t leaf_length; /* 8 */
uint32_t node_offset; /* 12 */
uint16_t xof_length; /* 14 */
uint8_t node_depth; /* 15 */
uint8_t inner_length; /* 16 */
uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */
uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */
});
Expand All @@ -81,7 +80,6 @@ typedef struct blake2xs_state__ {
/* Padded structs result in a compile-time error */
enum {
BLAKE2_DUMMY_1 = 1 / (int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
// BLAKE2_DUMMY_2 = 1/(int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
};

/* Streaming API */
Expand Down
3 changes: 0 additions & 3 deletions app/src/blake2s/blake2s-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ int blake2s_init(blake2s_state *S, size_t outlen) {
store16(&P->xof_length, 0);
P->node_depth = 0;
P->inner_length = 0;
/* memset(P->reserved, 0, sizeof(P->reserved) ); */
memset(P->salt, 0, sizeof(P->salt));
memset(P->personal, 0, sizeof(P->personal));
return blake2s_init_param(S, P);
Expand All @@ -114,7 +113,6 @@ int blake2s_init_with_personalization(blake2s_state *S, size_t outlen, const uin
store16(&P->xof_length, 0);
P->node_depth = 0;
P->inner_length = 0;
/* memset(P->reserved, 0, sizeof(P->reserved) ); */
memset(P->salt, 0, sizeof(P->salt));
memset(P->personal, 0, sizeof(P->personal));
memcpy(P->personal, personalization, personalizationlen);
Expand All @@ -138,7 +136,6 @@ int blake2s_init_key(blake2s_state *S, size_t outlen, const void *key, size_t ke
store16(&P->xof_length, 0);
P->node_depth = 0;
P->inner_length = 0;
/* memset(P->reserved, 0, sizeof(P->reserved) ); */
memset(P->salt, 0, sizeof(P->salt));
memset(P->personal, 0, sizeof(P->personal));

Expand Down
3 changes: 0 additions & 3 deletions app/src/parser_impl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#pragma once

#include "parser_common.h"
// #include <zxmacros.h>
// #include "zxtypes.h"
// #include "parser_txdef.h"

#ifdef __cplusplus
extern "C" {
Expand Down
6 changes: 0 additions & 6 deletions app/src/review_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ zxerr_t getNumItemsPublicAddress(uint8_t *num_items) {

zxerr_t getItemPublicAddress(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen,
uint8_t pageIdx, uint8_t *pageCount) {
ZEMU_LOGF(50, "[addr_getItem] %d/%d\n", displayIdx, pageIdx)

switch (displayIdx) {
case 0:
snprintf(outKey, outKeyLen, "Address");
Expand Down Expand Up @@ -74,8 +72,6 @@ zxerr_t getNumItemsProofGenerationKey(uint8_t *num_items) {

zxerr_t getItemProofGenerationKey(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen,
uint8_t pageIdx, uint8_t *pageCount) {
ZEMU_LOGF(50, "[addr_getItem] %d/%d\n", displayIdx, pageIdx)

switch (displayIdx) {
case 0:
snprintf(outKey, outKeyLen, "AuthKey");
Expand Down Expand Up @@ -115,8 +111,6 @@ zxerr_t getNumItemsViewKey(uint8_t *num_items) {

zxerr_t getItemViewKey(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen,
uint8_t pageIdx, uint8_t *pageCount) {
ZEMU_LOGF(50, "[addr_getItem] %d/%d\n", displayIdx, pageIdx)

switch (displayIdx) {
case 0:
snprintf(outKey, outKeyLen, "ViewKey");
Expand Down
Loading