Пример #1
0
GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const QByteArray & signedData, QByteArray & plainText ) {
  setup( signedData );
  const GpgME::VerificationResult res = mCtx->verifyOpaqueSignature( *mInData, *mOutData );
  plainText = mOutDataDataProvider->data();
  getAuditLog();
  return res;
}
Пример #2
0
GpgME::EncryptionResult Kleo::QGpgMEEncryptJob::exec( const std::vector<GpgME::Key> & recipients,
						      const QByteArray & plainText,
						      bool alwaysTrust,
						      QByteArray & ciphertext ) {
  setup( plainText );
  const GpgME::Context::EncryptionFlags flags =
    alwaysTrust ? GpgME::Context::AlwaysTrust : GpgME::Context::None;
  mResult = mCtx->encrypt( recipients, *mInData, *mOutData, flags );
  ciphertext = mOutDataDataProvider->data();
  getAuditLog();
  return mResult;
}