aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/pubkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/pubkey.h')
-rw-r--r--src/lib/pubkey/pubkey.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/lib/pubkey/pubkey.h b/src/lib/pubkey/pubkey.h
index 67116a9ec..637e522e4 100644
--- a/src/lib/pubkey/pubkey.h
+++ b/src/lib/pubkey/pubkey.h
@@ -134,7 +134,7 @@ class BOTAN_DLL PK_Signer
const std::string& provider = "");
/**
- * Sign a message.
+ * Sign a message all in one go
* @param in the message to sign as a byte array
* @param length the length of the above byte array
* @param rng the rng to use
@@ -181,6 +181,15 @@ class BOTAN_DLL PK_Signer
void update(const std::vector<byte>& in) { update(in.data(), in.size()); }
/**
+ * Add a message part.
+ * @param in the message part to add
+ */
+ void update(const std::string& in)
+ {
+ update(reinterpret_cast<const byte*>(in.data()), in.size());
+ }
+
+ /**
* Get the signature of the so far processed message (provided by the
* calls to update()).
* @param rng the rng to use
@@ -265,6 +274,15 @@ class BOTAN_DLL PK_Verifier
{ update(in.data(), in.size()); }
/**
+ * Add a message part of the message corresponding to the
+ * signature to be verified.
+ */
+ void update(const std::string& in)
+ {
+ update(reinterpret_cast<const byte*>(in.data()), in.size());
+ }
+
+ /**
* Check the signature of the buffered message, i.e. the one build
* by successive calls to update.
* @param sig the signature to be verified as a byte array