summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KSMIMECrypto.java
blob: bfaa674a5df45ee50116cce98d9f730adfc99f65 (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;

/**
*/
public class KSMIMECrypto implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KSMIMECrypto(Class dummy){}

	public static final int KSC_C_DES3_CBC = 1;
	public static final int KSC_C_RC2_CBC_128 = 2;
	public static final int KSC_C_RC2_CBC_64 = 3;
	public static final int KSC_C_DES_CBC = 4;
	public static final int KSC_C_RC2_CBC_40 = 5;

	public static final int KSC_R_OK = 0;
	public static final int KSC_R_OTHER = 1;
	public static final int KSC_R_NO_SSL = 2;
	public static final int KSC_R_NOCIPHER = 3;
	public static final int KSC_R_NOMEM = 4;
	public static final int KSC_R_FORMAT = 5;
	public static final int KSC_R_WRONGKEY = 6;
	public static final int KSC_R_VERIFY = 7;

	public KSMIMECrypto() {
		newKSMIMECrypto();
	}
	private native void newKSMIMECrypto();
	/**	
		 Sign a message
			@param clearText MIME representation of the message (part) to sign
			@param cipherText signature to append or signature block
			@param privKey private key/certificate to sign with
			@param certs additional certificates (may be empty)
			@param detached create detached or opaque signature
				@return 0 on success
     
		@short    Sign a message
	*/
	// KSMIMECrypto::rc signMessage(const TQCString& arg1,TQByteArray& arg2,const KSSLPKCS12& arg3,const TQPtrList<KSSLCertificate>& arg4,bool arg5); >>>> NOT CONVERTED
	/**	
		 Check a detached message signature
		 Will check if messages matches signature and extract certificates
		 Does not check certificates for validity!
			@param clearText MIME representation of signed message (without SIG)
			@param signature signature
			@param foundCerts certificates found in this message
				@return 0 on success
     
		@short    Check a detached message signature  Will check if messages matches signature and extract certificates  Does not check certificates for validity!
	*/
	// KSMIMECrypto::rc checkDetachedSignature(const TQCString& arg1,const TQByteArray& arg2,TQPtrList<KSSLCertificate>& arg3); >>>> NOT CONVERTED
	/**	
		 Check an opaque signed message
		 Will check if signature matches and extract message
		 Does not check certificates for validity!
			@param signedText signed message block
			@param clearText cleartext of signed message
		 @foundCerts certificates found in this mesasge
				@return 0 on success
     
		@short    Check an opaque signed message  Will check if signature matches and extract message  Does not check certificates for validity!
	*/
	// KSMIMECrypto::rc checkOpaqueSignature(const TQByteArray& arg1,TQCString& arg2,TQPtrList<KSSLCertificate>& arg3); >>>> NOT CONVERTED
	/**	
		 Encrypt a message
		 encrypts a message for the given list of recipients and the
		 selected algorithm. Note that any algorithm <128 bytes is
		 insecure and should never be used, even if SMIME-2 requires
		 only RC2-40
			@param clearText MIME representation of message to encrypt
			@param cipherText returned encrypted message
			@param algorithm encryption algorithm
		 @recip recipient certificates
				@return 0 on success
     
		@short    Encrypt a message  encrypts a message for the given list of recipients and the  selected algorithm.
	*/
	// KSMIMECrypto::rc encryptMessage(const TQCString& arg1,TQByteArray& arg2,KSMIMECrypto::algo arg3,const TQPtrList<KSSLCertificate>& arg4); >>>> NOT CONVERTED
	/**	
		 Decrypt a message
			@param cipherText encrypted message block
			@param clearText returns decrypted message
			@param privKey private key to use
				@return 0 on success
     
		@short    Decrypt a message
	*/
	public native int decryptMessage(byte[] cipherText, StringBuffer clearText, KSSLPKCS12 privKey);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}