1 #ifndef LIBFILEZILLA_SIGNATURE_HEADER 2 #define LIBFILEZILLA_SIGNATURE_HEADER 28 explicit operator bool()
const {
29 return key_.size() == key_size;
33 return key_ == rhs.key_;
37 return !(*
this == rhs);
41 return key_ < rhs.key_;
44 std::string to_base64()
const;
47 std::vector<uint8_t> key_;
64 explicit operator bool()
const {
65 return key_.size() == key_size;
71 std::vector<uint8_t>
const& data()
const {
75 std::string to_base64()
const;
79 std::vector<uint8_t> key_;
87 std::vector<uint8_t> FZ_PUBLIC_SYMBOL
sign(std::vector<uint8_t>
const& message, private_signing_key
const& priv);
88 std::vector<uint8_t> FZ_PUBLIC_SYMBOL
sign(std::string
const& message, private_signing_key
const& priv);
89 std::vector<uint8_t> FZ_PUBLIC_SYMBOL
sign(uint8_t
const& message,
size_t const size, private_signing_key
const& priv);
92 bool FZ_PUBLIC_SYMBOL
verify(std::vector<uint8_t>
const& message, public_verification_key
const& pub);
93 bool FZ_PUBLIC_SYMBOL
verify(std::string
const& message, public_verification_key
const& pub);
94 bool FZ_PUBLIC_SYMBOL
verify(uint8_t
const* message,
size_t const size, public_verification_key
const& pub);
Represents a private key to sign message with using Ed25519.
Definition: signature.hpp:54
Represents a public key to verify messages signed using Ed25519.
Definition: signature.hpp:21
std::vector< uint8_t > sign(std::vector< uint8_t > const &message, private_signing_key const &priv)
Returns the message with the signature appended, created using the passed private key...
The namespace used by libfilezilla.
Definition: apply.hpp:16
Sets some global macros and further includes string.hpp.
bool verify(std::vector< uint8_t > const &message, public_verification_key const &pub)
Verify the message. Returns true iff it has been signed by the private key corresponding to the passe...