xca/lib/Passwd.cpp
Christian Hohnstaedt b2a69f3586 Several fixes of previous commit
Passwd::cleanse() also resets the password size
db_base::flushLookup() now deletes all items
and pki_base does not anymore.

Drop TRACE
Colorize pki_base::print()

Set and inherit filename of loaded items
Add print() method to pki_pkcs12
and constify its methods
2020-03-11 07:19:56 +01:00

25 lines
352 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2012 Christian Hohnstaedt.
*
* All rights reserved.
*/
#include <QByteArray>
#include "Passwd.h"
void Passwd::cleanse()
{
memset(data(), 0, size());
clear();
}
Passwd::~Passwd()
{
Passwd::cleanse();
}
unsigned char *Passwd::constUchar() const
{
return (unsigned char *)(size() ? constData() : "");
}