remove unnecessary secure memory usage in pgp api

svn path=/trunk/kdesupport/qca/; revision=674773
This commit is contained in:
Justin Karneges 2007-06-13 00:34:06 +00:00
parent 3d0f851cb3
commit 46d519ae31
4 changed files with 9 additions and 9 deletions

View File

@ -2280,7 +2280,7 @@ public:
\sa fromArray for a static import method.
\sa toString for an "ascii armoured" export method.
*/
SecureArray toArray() const;
QByteArray toArray() const;
/**
Export the key to a string
@ -2308,7 +2308,7 @@ public:
\param provider the provider to use, if a particular provider is
required
*/
static PGPKey fromArray(const SecureArray &a, ConvertResult *result = 0, const QString &provider = QString());
static PGPKey fromArray(const QByteArray &a, ConvertResult *result = 0, const QString &provider = QString());
/**
Import the key from a string

View File

@ -366,9 +366,9 @@ public:
virtual const PGPKeyContextProps *props() const = 0;
virtual SecureArray toBinary() const = 0;
virtual QByteArray toBinary() const = 0;
virtual QString toAscii() const = 0;
virtual ConvertResult fromBinary(const SecureArray &a) = 0;
virtual ConvertResult fromBinary(const QByteArray &a) = 0;
virtual ConvertResult fromAscii(const QString &s) = 0;
};

View File

@ -126,10 +126,10 @@ public:
return &_props;
}
virtual SecureArray toBinary() const
virtual QByteArray toBinary() const
{
// TODO
return SecureArray();
return QByteArray();
}
virtual QString toAscii() const
@ -149,7 +149,7 @@ public:
return str;
}
virtual ConvertResult fromBinary(const SecureArray &a)
virtual ConvertResult fromBinary(const QByteArray &a)
{
// TODO
Q_UNUSED(a);

View File

@ -2733,7 +2733,7 @@ bool PGPKey::isTrusted() const
return static_cast<const PGPKeyContext *>(context())->props()->isTrusted;
}
SecureArray PGPKey::toArray() const
QByteArray PGPKey::toArray() const
{
return static_cast<const PGPKeyContext *>(context())->toBinary();
}
@ -2748,7 +2748,7 @@ bool PGPKey::toFile(const QString &fileName) const
return stringToFile(fileName, toString());
}
PGPKey PGPKey::fromArray(const SecureArray &a, ConvertResult *result, const QString &provider)
PGPKey PGPKey::fromArray(const QByteArray &a, ConvertResult *result, const QString &provider)
{
PGPKey k;
PGPKeyContext *kc = static_cast<PGPKeyContext *>(getContext("pgpkey", provider));