// and we have a `forKey` static function that returns
// an instance of this class
PKeyCtx(PKeyCtx&& other)
- : _ctx(nullptr)
{
std::swap(_ctx, other._ctx);
}
private:
Q_DISABLE_COPY(PKeyCtx)
- PKeyCtx()
- : _ctx(nullptr)
- {
- }
+ PKeyCtx() = default;
- EVP_PKEY_CTX* _ctx;
+ EVP_PKEY_CTX* _ctx = nullptr;
};
class PKey {
// and we have a static functions that return
// an instance of this class
PKey(PKey&& other)
- : _pkey(nullptr)
{
std::swap(_pkey, other._pkey);
}
private:
Q_DISABLE_COPY(PKey)
- PKey()
- : _pkey(nullptr)
- {
- }
+ PKey() = default;
- EVP_PKEY* _pkey;
+ EVP_PKEY* _pkey = nullptr;
};
-
-
-
QByteArray BIO2ByteArray(Bio &b) {
int pending = BIO_ctrl_pending(b);
QByteArray res(pending, '\0');