~ubuntu-branches/ubuntu/wily/qca2/wily-proposed

« back to all changes in this revision

Viewing changes to examples/rsatest/rsatest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2007-10-27 18:51:54 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20071027185154-4ir9ys3h2q9fofrw
Tags: 2.0.0-2
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    // supportedIOTypes, not just supportedTypes
42
42
    if(!QCA::isSupported("pkey") ||
43
43
       !QCA::PKey::supportedIOTypes().contains(QCA::PKey::RSA))
44
 
        printf("RSA not supported!\n");
 
44
        std::cout << "RSA not supported!\n";
45
45
    else {
46
46
        // When creating a public / private key pair, you make the
47
47
        // private key, and then extract the public key component from it
97
97
        // we read in. The algorithm is the same.
98
98
        QCA::SecureArray decrypt;
99
99
        if(0 == privateKey.decrypt(result, &decrypt, QCA::EME_PKCS1_OAEP)) {
100
 
            printf("Error decrypting.\n");
 
100
            std::cout << "Error decrypting.\n";
101
101
            return 1;
102
102
        }
103
103