File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ namespace monocypher {
46
46
47
47
// ======== Utilities:
48
48
49
- static inline const uint8_t * u8 (const void *p) {return reinterpret_cast <const uint8_t *>(p);}
50
- static inline uint8_t * u8 (void *p) {return reinterpret_cast <uint8_t *>(p);}
49
+ static inline const uint8_t * u8 (const void *p) {return static_cast <const uint8_t *>(p);}
50
+ static inline uint8_t * u8 (void *p) {return static_cast <uint8_t *>(p);}
51
51
52
52
53
53
// / Fills the array with cryptographically-secure random bytes.
Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ namespace monocypher {
73
73
74
74
75
75
namespace { // internal stuff
76
- static constexpr size_t boxedSize (size_t plaintextSize) {
76
+ constexpr size_t boxedSize (size_t plaintextSize) {
77
77
return plaintextSize + sizeof (mac);
78
78
}
79
79
80
- static constexpr size_t unboxedSize (size_t ciphertextSize) {
80
+ constexpr size_t unboxedSize (size_t ciphertextSize) {
81
81
return std::max (ciphertextSize, sizeof (mac)) - sizeof (mac);
82
82
}
83
83
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ namespace monocypher {
56
56
public_key () :byte_array<32 >(0 ) { }
57
57
explicit public_key (const std::array<uint8_t ,32 > &a) :byte_array<32>(a) { }
58
58
public_key (const void *data, size_t size) :byte_array<32 >(data, size) { }
59
- explicit public_key (input_bytes k) :public_key(k.data, k.size) { }
59
+ explicit public_key (input_bytes k) :public_key(k.data, k.size) { }
60
60
61
61
// / Verifies a signature.
62
62
[[nodiscard]]
Original file line number Diff line number Diff line change 30
30
31
31
#include " monocypher/ext/xsalsa20.hh"
32
32
#include < memory>
33
- #include < string.h >
33
+ #include < cstring >
34
34
35
35
// Wrap 3rd party tweetnacl.c in a namespace to avoid messing with global namespace:
36
36
namespace monocypher ::tweetnacl {
You can’t perform that action at this time.
0 commit comments