mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Dead code.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
#include "Hanko.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
Hanko::Hanko()
|
||||
{
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
65
src/Hanko.h
65
src/Hanko.h
@@ -1,65 +0,0 @@
|
||||
#ifndef __HANKO__
|
||||
#define __HANKO__
|
||||
|
||||
// We use SECP256K1 http://www.secg.org/collateral/sec2_final.pdf
|
||||
|
||||
#include "key.h"
|
||||
|
||||
enum HankoFormat
|
||||
{
|
||||
TEXT, // Hanko in text form
|
||||
RAW, // Hanko in raw binary form
|
||||
CONTACT, // Hanko contact block
|
||||
};
|
||||
|
||||
|
||||
class Hanko
|
||||
{
|
||||
public:
|
||||
static const int smPubKeySize= 65;
|
||||
static const int smPrivKeySize = 279;
|
||||
static const int smSigSize = 57;
|
||||
|
||||
private:
|
||||
std::string mHanko;
|
||||
std::vector<unsigned char> mContactBlock;
|
||||
CKey mPubKey;
|
||||
|
||||
public:
|
||||
Hanko();
|
||||
Hanko(const std::string& TextHanko);
|
||||
Hanko(const std::vector<unsigned char>& Data, HankoFormat format);
|
||||
Hanko(const CKey &pubKey);
|
||||
Hanko(const Hanko &);
|
||||
|
||||
std::string GetHankoString(HankoFormat format) const;
|
||||
std::vector<unsigned char> GetHankoBinary(HankoFormat format) const;
|
||||
|
||||
const std::vector<unsigned char>& GetContactBlock() const { return mContactBlock; }
|
||||
const CKey& GetPublicKey() const { return mPubKey; }
|
||||
|
||||
int UpdateContact(std::vector<unsigned char>& Contact);
|
||||
|
||||
bool CheckHashSign(const uint256& hash, const std::vector<unsigned char>& Signature);
|
||||
bool CheckPrefixSign(const std::vector<unsigned char>& data, uint64 type,
|
||||
const std::vector<unsigned char> &signature);
|
||||
};
|
||||
|
||||
|
||||
class LocalHanko : public Hanko
|
||||
{
|
||||
private:
|
||||
CKey mPrivKey;
|
||||
|
||||
public:
|
||||
LocalHanko(std::vector<unsigned char> &PrivKey);
|
||||
LocalHanko(const CKey &Privkey);
|
||||
LocalHanko(const LocalHanko &);
|
||||
~LocalHanko();
|
||||
|
||||
bool HashSign(const uint256& hash, std::vector<unsigned char>& Signature);
|
||||
bool PrefixSign(std::vector<unsigned char> data, uint64 type, std::vector<unsigned char> &Signature);
|
||||
};
|
||||
|
||||
#endif
|
||||
// vim:ts=4
|
||||
Reference in New Issue
Block a user