Skip to content

Commit c2a74b6

Browse files
committed
lib/sodium/Arithmetic: new header with <sodium/utils.h> wrappers
1 parent da36f1b commit c2a74b6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/lib/sodium/Arithmetic.hxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: BSD-2-Clause
2+
// author: Max Kellermann <max.kellermann@gmail.com>
3+
4+
#pragma once
5+
6+
#include <sodium/utils.h>
7+
8+
#include <cstddef> // for std::byte
9+
#include <span>
10+
11+
inline void
12+
sodium_increment(std::span<std::byte> n) noexcept
13+
{
14+
sodium_increment(reinterpret_cast<unsigned char *>(n.data()), n.size());
15+
}

0 commit comments

Comments
 (0)