source: psi/trunk/cutestuff/xmlsec/keyops.h@ 65

Last change on this file since 65 was 2, checked in by dmik, 19 years ago

Imported original Psi 0.10 sources from Affinix

File size: 786 bytes
Line 
1#ifndef CS_KEYOPS_H
2#define CS_KEYOPS_H
3
4#include<qstring.h>
5#include<qcstring.h>
6#include"../util/cipher.h"
7
8// sym_encrypt - encrypt 'data' and return a base64 string of the result
9bool sym_encrypt(const QByteArray &data, const Cipher::Key &key, const QByteArray &iv, QString *out);
10
11// sym_decrypt - take a base64 string, decode and decrypt it, return the result
12bool sym_decrypt(const QString &str, const Cipher::Key &key, QByteArray *out);
13
14// sym_keywrap - encrypt key 'data' and return a base64 string of the result
15bool sym_keywrap(const QByteArray &data, const Cipher::Key &key, QString *out);
16
17// sym_keyunwrap - take a base64 string, decode and decrypt it, return the result (key data)
18bool sym_keyunwrap(const QString &str, const Cipher::Key &key, QByteArray *out);
19
20#endif
Note: See TracBrowser for help on using the repository browser.