mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-10 09:49:33 +00:00
Spello fix, plus remove whitespace.
svn path=/trunk/kdesupport/qca/; revision=618415
This commit is contained in:
parent
8376d644ba
commit
fe9a1df241
@ -8,10 +8,10 @@
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
// the Initializer object sets things up, and
|
||||
// also does cleanup when it goes out of scope
|
||||
QCA::Initializer init;
|
||||
|
||||
@ -46,7 +46,7 @@ int main(int argc, char** argv)
|
||||
qWarning() << "Sorry, could not import public key certificate";
|
||||
return 1;
|
||||
}
|
||||
// We are building the certificate into a SecureMessageKey object, via a
|
||||
// We are building the certificate into a SecureMessageKey object, via a
|
||||
// CertificateChain
|
||||
QCA::SecureMessageKey secMsgKey;
|
||||
QCA::CertificateChain chain;
|
||||
@ -62,7 +62,7 @@ int main(int argc, char** argv)
|
||||
QCA::SecureMessage msg(&cms);
|
||||
msg.setRecipient(secMsgKey);
|
||||
|
||||
// Some plain text - we use the first comamnd line argument if provided
|
||||
// Some plain text - we use the first command line argument if provided
|
||||
QByteArray plainText = (argc >= 2) ? argv[1] : "What do ya want for nuthin'";
|
||||
|
||||
// Now use the SecureMessage object to encrypt the plain text.
|
||||
@ -118,7 +118,7 @@ int main(int argc, char** argv)
|
||||
msg2.startDecrypt();
|
||||
msg2.update( cipherText );
|
||||
msg2.end();
|
||||
|
||||
|
||||
// I think it is reasonable to wait for 1 second for this
|
||||
msg2.waitForFinished(1000);
|
||||
|
||||
@ -131,7 +131,7 @@ int main(int argc, char** argv)
|
||||
|
||||
QSecureArray plainTextResult = msg2.read();
|
||||
|
||||
qDebug() << enc.arrayToString( cipherText )
|
||||
qDebug() << enc.arrayToString( cipherText )
|
||||
<< " (in base 64) decrypts to: "
|
||||
<< plainTextResult.data();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user