mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-07-30 16:26:28 +08:00
🎨 Committing clang-format changes
This commit is contained in:
parent
9680c93bd1
commit
b64c930b16
@ -143,7 +143,8 @@ namespace chaiscript {
|
||||
|
||||
m_engine.add(fun([this](const std::function<std::string(const std::string &)> &t_reader) {
|
||||
m_file_reader = t_reader;
|
||||
}), "set_file_reader");
|
||||
}),
|
||||
"set_file_reader");
|
||||
|
||||
m_engine.add(fun([this]() { m_engine.dump_system(); }), "dump_system");
|
||||
m_engine.add(fun([this](const Boxed_Value &t_bv) { m_engine.dump_object(t_bv); }), "dump_object");
|
||||
|
||||
16
src/sha3.h
16
src/sha3.h
@ -6,7 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "hash.h"
|
||||
// #include "hash.h"
|
||||
#include <string>
|
||||
|
||||
// define fixed size integer types
|
||||
@ -19,7 +19,6 @@ typedef unsigned __int64 uint64_t;
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
/// compute SHA3 hash
|
||||
/** Usage:
|
||||
SHA3 sha3;
|
||||
@ -37,18 +36,21 @@ class SHA3 //: public Hash
|
||||
{
|
||||
public:
|
||||
/// algorithm variants
|
||||
enum Bits { Bits224 = 224, Bits256 = 256, Bits384 = 384, Bits512 = 512 };
|
||||
enum Bits { Bits224 = 224,
|
||||
Bits256 = 256,
|
||||
Bits384 = 384,
|
||||
Bits512 = 512 };
|
||||
|
||||
/// same as reset()
|
||||
explicit SHA3(Bits bits = Bits256);
|
||||
|
||||
/// compute hash of a memory block
|
||||
std::string operator()(const void* data, size_t numBytes);
|
||||
std::string operator()(const void *data, size_t numBytes);
|
||||
/// compute hash of a string, excluding final zero
|
||||
std::string operator()(const std::string& text);
|
||||
std::string operator()(const std::string &text);
|
||||
|
||||
/// add arbitrary number of bytes
|
||||
void add(const void* data, size_t numBytes);
|
||||
void add(const void *data, size_t numBytes);
|
||||
|
||||
/// return latest hash as hex characters
|
||||
std::string getHash();
|
||||
@ -58,7 +60,7 @@ public:
|
||||
|
||||
private:
|
||||
/// process a full block
|
||||
void processBlock(const void* data);
|
||||
void processBlock(const void *data);
|
||||
/// process everything left in the internal buffer
|
||||
void processBuffer();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user