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
d124111e
Commit
d124111e
authored
Sep 19, 2016
by
yids
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pl_decrypt and text.c fix
parent
2c26fd3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
base-tx/test.c
base-tx/test.c
+1
-1
libs/pagerlib/pagerlib.c
libs/pagerlib/pagerlib.c
+1
-1
No files found.
base-tx/test.c
View file @
d124111e
...
...
@@ -84,7 +84,7 @@ int main() {
printf
(
"
\n
encrypted message:
\n
%s
\n
END encrypted message
\n
"
,
rcv_ctx
->
msg
->
msg
);
switch
(
pl_receive_message
(
sender
_ctx
))
{
switch
(
pl_receive_message
(
rcv
_ctx
))
{
case
0
:
printf
(
"RCV: OK!
\n
"
);
printf
(
" Message!
\n
to: %u from: %u
\n
the decrypted message: %s
\n
"
,
rcv_ctx
->
msg
->
address
,
compressed_point_to_addr
(
rcv_ctx
->
msg
->
sender_public_key
),
rcv_ctx
->
msg
->
msg
);
...
...
libs/pagerlib/pagerlib.c
View file @
d124111e
...
...
@@ -190,7 +190,7 @@ pl_decrypt(struct pl_ctx * ctx, struct pl_pagermessage * msg, char plain[PLAIN_
memset
(
temp_encrypted
,
'\0'
,
crypto_box_BOXZEROBYTES
);
memcpy
(
temp_encrypted
,
msg
->
msg
,
CRYPTED_MSG_SIZE
);
rc
=
crypto_box_open
(
temp_plain
,
temp_encrypted
,
CRYPTED_MSG_SIZE
,
ctx
->
msg
->
nonce
,
ctx
->
msg
->
sender_public_key
,
ctx
->
kp
->
secret_key
);
rc
=
crypto_box_open
(
temp_plain
,
temp_encrypted
,
CRYPTED_MSG_SIZE
,
msg
->
nonce
,
msg
->
sender_public_key
,
ctx
->
kp
->
secret_key
);
if
(
rc
!=
0
)
{
return
-
1
;
...
...
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