Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
yids
avr-pager
Commits
66ccdd41
Commit
66ccdd41
authored
Jan 20, 2017
by
yids
Browse files
forgot some
parent
665bd466
Changes
2
Hide whitespace changes
Inline
Side-by-side
libs/avrnacl-20140813/config
View file @
66ccdd41
# Edit this file to configure the AVRNaCl build system
# Do not put spaces before or after the '=' character.
TARGET_DEVICE=atmega
2560
TARGET_DEVICE=atmega
328p
CPUFREQ=16000000
CC=/usr/bin/avr-gcc
OBJCOPY=/usr/bin/avr-objcopy
...
...
libs/pagerlib/pagerlib.h
View file @
66ccdd41
...
...
@@ -37,7 +37,7 @@ extern "C"
#define DBM
#endif
typedef
enum
{
false
,
true
}
bool
;
//
typedef enum { false, true } bool;
/*
* List of all the available keypairs
...
...
@@ -58,8 +58,8 @@ typedef struct list_kp {
*/
typedef
struct
list_public_key
{
uint32_t
id
;
char
public_key
[
crypto_box_PUBLICKEYBYTES
];
bool
is_group
;
unsigned
char
public_key
[
crypto_box_PUBLICKEYBYTES
];
//
bool is_group;
char
alias
[
32
];
struct
list_public_key
*
prev
;
struct
list_public_key
*
next
;
...
...
@@ -85,7 +85,7 @@ typedef struct list_inbox {
struct
pl_ctx
{
// contains the message that will be send or is received
char
clear_message
[
MSG_SIZE
];
//
char clear_message[MSG_SIZE];
char
decryptbuffer
[
PLAIN_MSG_SIZE
];
struct
pl_keypair
*
kp
;
// my (currently used ) keypair
struct
list_kp
*
keypairs
;
// keypair list (all available keypairs)
...
...
@@ -93,15 +93,17 @@ struct pl_ctx
int
msgcount
;
struct
list_inbox
*
inbox
;
struct
list_inbox
*
inbox_curr
;
char
receiver_public_key
[
crypto_box_PUBLICKEYBYTES
];
#ifndef RX
unsigned
char
receiver_public_key
[
crypto_box_PUBLICKEYBYTES
];
struct
list_public_key
*
public_keys
;
#endif
uint8_t
err
;
};
struct
pl_ctx
*
pl_init
();
struct
pl_keypair
*
pl_create_keypair
(
struct
pl_ctx
*
);
int
pl_set_receiver
(
struct
pl_ctx
*
ctx
,
char
*
public_key
);
int
pl_set_receiver
(
struct
pl_ctx
*
ctx
,
unsigned
char
*
public_key
);
int
pl_set_receiver_by_address
(
struct
pl_ctx
*
ctx
,
uint32_t
addr
);
int
pl_send_message
(
struct
pl_ctx
*
);
...
...
@@ -115,7 +117,7 @@ int pl_save_public_key(char pubkey[crypto_box_PUBLICKEYBYTES], char *filename);
char
*
pl_load_public_key
(
char
*
filename
);
int
pl_print_keylist
(
struct
pl_ctx
*
ctx
);
int
pl_load_key_in_list
(
struct
pl_ctx
*
ctx
,
struct
pl_keypair
*
key
);
int
pl_load_public_key_in_list
(
struct
pl_ctx
*
ctx
,
char
*
public_key
,
char
*
alias
);
int
pl_load_public_key_in_list
(
struct
pl_ctx
*
ctx
,
unsigned
char
*
public_key
,
char
*
alias
);
int
pl_print_public_keylist
(
struct
pl_ctx
*
ctx
);
int
pl_load_public_keys_from_folder
(
struct
pl_ctx
*
ctx
,
char
const
*
folder
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment