File: key.h

package info (click to toggle)
qterm 1%3A0.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,048 kB
  • ctags: 3,132
  • sloc: cpp: 41,779; ansic: 422; xml: 122; makefile: 9
file content (54 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// C++ Interface: sshkey
//
// Description:
//
//
// Author: hooey <hephooey@gmail.com>, (C) 2016
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef SSH_KEY_H
#define SSH_KEY_H
extern "C" {
#include "libcrypto-compat.h"
}
#include <QByteArray>
namespace QTerm
{
class SSH2Key
{
public:
    SSH2Key() {}
    virtual ~SSH2Key() {}
    virtual QByteArray publicKey() = 0;
};

class SSH2RSAKey : public SSH2Key
{
public:
    SSH2RSAKey(RSA * keyData);
    virtual ~SSH2RSAKey();
    virtual QByteArray publicKey();
    RSA * privateKey() {return m_key;}
private:
    RSA * m_key;
};

class SSH2DSAKey : public SSH2Key
{
public:
    SSH2DSAKey(DSA * keyData);
    virtual ~SSH2DSAKey();
    virtual QByteArray publicKey();
    DSA * privateKey() {return m_key;}
private:
    DSA * m_key;
};

}

#endif // SSH_KEY_H