xca/lib/Passwd.cpp
Christian Hohnstaedt b622e64209 consolidate Password and Pin input dialogs
change storage type of passwords from char[] to QByteArray
Create PwDialog class and drop passWrite and passRead
Create Passwd class derived from QBytearray
move PKCS12 password input to PwDialog
2011-04-30 07:53:26 +02:00

25 lines
350 B
C++

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