-
Notifications
You must be signed in to change notification settings - Fork 0
/
nettle.vapi
24 lines (20 loc) · 992 Bytes
/
nettle.vapi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace Nettle
{
[CCode (has_target = false)]
public delegate void CryptFunc(void* ctx, uint length, uint8* dst, uint8* src);
[CCode (cname = "struct aes_ctx", cprefix = "aes_", cheader_filename = "nettle/aes.h")]
public struct AES
{
public void set_encrypt_key(uint length, uint8* key);
public void set_decrypt_key(uint length, uint8* key);
public void invert_key(AES *src);
public void encrypt(uint length, uint8* dst, uint8* src);
public void decrypt(uint length, uint8* dst, uint8* src);
}
[CCode (cname = "cbc_encrypt", cheader_filename = "nettle/cbc.h")]
public void cbc_encrypt(void* ctx, CryptFunc f, uint block_size, uint8* iv, uint length, uint8* dst, uint8* src);
[CCode (cname = "cbc_decrypt", cheader_filename = "nettle/cbc.h")]
public void cbc_decrypt(void* ctx, CryptFunc f, uint block_size, uint8* iv, uint length, uint8* dst, uint8* src);
[CCode (cname = "AES_BLOCK_SIZE", cheader_filename = "nettle/aes.h")]
public const int AES_BLOCK_SIZE;
}