Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
avr-pager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yids
avr-pager
Commits
66ccdd41
Commit
66ccdd41
authored
Jan 20, 2017
by
yids
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forgot some
parent
665bd466
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
libs/avrnacl-20140813/config
libs/avrnacl-20140813/config
+1
-1
libs/pagerlib/pagerlib.h
libs/pagerlib/pagerlib.h
+9
-7
No files found.
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
Markdown
is supported
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