1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.commons.crypto.jna;
20
21 import java.nio.ByteBuffer;
22
23 import com.sun.jna.NativeLong;
24 import com.sun.jna.ptr.PointerByReference;
25
26
27
28
29
30 interface OpenSslInterfaceNativeJna {
31
32 PointerByReference _ENGINE_by_id(final String string);
33
34
35 int _ENGINE_cleanup();
36
37 int _ENGINE_finish(final PointerByReference rdrandEngine);
38
39 int _ENGINE_free(final PointerByReference rdrandEngine);
40
41 int _ENGINE_init(final PointerByReference rdrandEngine);
42
43 void _ENGINE_load_rdrand();
44
45 int _ENGINE_set_default(final PointerByReference rdrandEngine, final int flags);
46
47 String _ERR_error_string(final NativeLong err, final char[] buff);
48
49 NativeLong _ERR_peek_error();
50
51 PointerByReference _EVP_aes_128_cbc();
52
53 PointerByReference _EVP_aes_128_ctr();
54
55 PointerByReference _EVP_aes_192_cbc();
56
57 PointerByReference _EVP_aes_192_ctr();
58
59 PointerByReference _EVP_aes_256_cbc();
60
61 PointerByReference _EVP_aes_256_ctr();
62
63 void _EVP_CIPHER_CTX_cleanup(final PointerByReference context);
64
65 void _EVP_CIPHER_CTX_free(final PointerByReference context);
66
67 PointerByReference _EVP_CIPHER_CTX_new();
68
69 int _EVP_CIPHER_CTX_set_padding(final PointerByReference context, final int padding);
70
71 int _EVP_CipherFinal_ex(final PointerByReference context, final ByteBuffer outBuffer,
72 final int[] outlen);
73
74 int _EVP_CipherInit_ex(final PointerByReference context, final PointerByReference algo,
75 final PointerByReference impl, final byte[] encoded, final byte[] iv, final int cipherMode);
76
77 int _EVP_CipherUpdate(final PointerByReference context, final ByteBuffer outBuffer,
78 final int[] outlen, final ByteBuffer inBuffer, final int remaining);
79
80 Throwable _INIT_ERROR();
81
82 boolean _INIT_OK();
83
84 String _OpenSSL_version(final int i);
85
86 int _RAND_bytes(final ByteBuffer buf, final int length);
87
88 PointerByReference _RAND_get_rand_method();
89
90 PointerByReference _RAND_SSLeay();
91 }