security: Add digest calculation support in transformation
Change-Id: I8326c19aff580289b5301687351d81fd74af8a83
Refs: #3009
diff --git a/src/security/transform/transform-base.cpp b/src/security/transform/transform-base.cpp
index 936e0ae..60e967b 100644
--- a/src/security/transform/transform-base.cpp
+++ b/src/security/transform/transform-base.cpp
@@ -92,6 +92,14 @@
}
void
+Transform::flushAllOutput()
+{
+ while (!isOutputBufferEmpty()) {
+ flushOutputBuffer();
+ }
+}
+
+void
Transform::setOutputBuffer(unique_ptr<OBuffer> buffer)
{
BOOST_ASSERT(isOutputBufferEmpty());
@@ -139,9 +147,7 @@
void
Transform::finalize()
{
- while (!isOutputBufferEmpty()) {
- flushOutputBuffer();
- }
+ flushAllOutput();
}
Source::Source()