Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
af7d88b0
Commit
af7d88b0
authored
2 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
crypto: allow to build all from std::string_view
parent
abe2e018
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/opendht/crypto.h
+4
-1
4 additions, 1 deletion
include/opendht/crypto.h
with
4 additions
and
1 deletion
include/opendht/crypto.h
+
4
−
1
View file @
af7d88b0
...
...
@@ -120,7 +120,9 @@ struct OPENDHT_PUBLIC PublicKey
inline
Blob
encrypt
(
const
Blob
&
data
)
const
{
return
encrypt
(
data
.
data
(),
data
.
size
());
}
inline
Blob
encrypt
(
std
::
string_view
data
)
const
{
return
encrypt
((
const
uint8_t
*
)
data
.
data
(),
data
.
size
());
}
void
pack
(
Blob
&
b
)
const
;
int
pack
(
uint8_t
*
out
,
size_t
*
out_len
)
const
;
void
unpack
(
const
uint8_t
*
dat
,
size_t
dat_size
);
...
...
@@ -186,6 +188,7 @@ struct OPENDHT_PUBLIC PrivateKey
* @returns the signature data.
*/
Blob
sign
(
const
uint8_t
*
data
,
size_t
data_len
)
const
;
inline
Blob
sign
(
std
::
string_view
dat
)
const
{
return
sign
((
const
uint8_t
*
)
dat
.
data
(),
dat
.
size
());
}
inline
Blob
sign
(
const
Blob
&
dat
)
const
{
return
sign
(
dat
.
data
(),
dat
.
size
());
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment