Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
fbdc5aa2
Commit
fbdc5aa2
authored
Aug 13, 2014
by
Kapp Arnaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add const qualifier to source parameters in zmq_z85_decode and zmq_z85_encode
parent
fadb2a38
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
zmq_z85_decode.txt
doc/zmq_z85_decode.txt
+2
-2
zmq_z85_encode.txt
doc/zmq_z85_encode.txt
+1
-1
zmq.h
include/zmq.h
+2
-2
zmq_utils.cpp
src/zmq_utils.cpp
+2
-2
No files found.
doc/zmq_z85_decode.txt
View file @
fbdc5aa2
...
...
@@ -9,7 +9,7 @@ zmq_z85_decode - decode a binary key from Z85 printable text
SYNOPSIS
--------
*uint8_t *zmq_z85_decode (uint8_t *dest, char *string);*
*uint8_t *zmq_z85_decode (uint8_t *dest, c
onst c
har *string);*
DESCRIPTION
...
...
@@ -31,7 +31,7 @@ EXAMPLE
-------
.Decoding a CURVE key
----
char decoded [] = "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7";
c
onst c
har decoded [] = "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7";
uint8_t public_key [32];
zmq_z85_decode (public_key, decoded);
----
...
...
doc/zmq_z85_encode.txt
View file @
fbdc5aa2
...
...
@@ -9,7 +9,7 @@ zmq_z85_encode - encode a binary key as Z85 printable text
SYNOPSIS
--------
*char *zmq_z85_encode (char *dest, uint8_t *data, size_t size);*
*char *zmq_z85_encode (char *dest,
const
uint8_t *data, size_t size);*
DESCRIPTION
...
...
include/zmq.h
View file @
fbdc5aa2
...
...
@@ -420,10 +420,10 @@ ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags);
/******************************************************************************/
/* Encode data with Z85 encoding. Returns encoded data */
ZMQ_EXPORT
char
*
zmq_z85_encode
(
char
*
dest
,
uint8_t
*
data
,
size_t
size
);
ZMQ_EXPORT
char
*
zmq_z85_encode
(
char
*
dest
,
const
uint8_t
*
data
,
size_t
size
);
/* Decode data with Z85 encoding. Returns decoded data */
ZMQ_EXPORT
uint8_t
*
zmq_z85_decode
(
uint8_t
*
dest
,
char
*
string
);
ZMQ_EXPORT
uint8_t
*
zmq_z85_decode
(
uint8_t
*
dest
,
c
onst
c
har
*
string
);
/* Generate z85-encoded public and private keypair with libsodium. */
/* Returns 0 on success. */
...
...
src/zmq_utils.cpp
View file @
fbdc5aa2
...
...
@@ -111,7 +111,7 @@ static uint8_t decoder [96] = {
// dest. Size must be a multiple of 4.
// Returns NULL and sets errno = EINVAL for invalid input.
char
*
zmq_z85_encode
(
char
*
dest
,
uint8_t
*
data
,
size_t
size
)
char
*
zmq_z85_encode
(
char
*
dest
,
const
uint8_t
*
data
,
size_t
size
)
{
if
(
size
%
4
!=
0
)
{
errno
=
EINVAL
;
...
...
@@ -145,7 +145,7 @@ char *zmq_z85_encode (char *dest, uint8_t *data, size_t size)
// must be a multiple of 5.
// Returns NULL and sets errno = EINVAL for invalid input.
uint8_t
*
zmq_z85_decode
(
uint8_t
*
dest
,
char
*
string
)
uint8_t
*
zmq_z85_decode
(
uint8_t
*
dest
,
c
onst
c
har
*
string
)
{
if
(
strlen
(
string
)
%
5
!=
0
)
{
errno
=
EINVAL
;
...
...
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