radare2/libr/vapi/r_crypto.vapi
pancake 6d58b7bb7b * Added initial vapi file for r_crypto
* Fix r_util List interface for list.h
  - Test program is now working. Thanks juergbi!
  - Needs vala>=20091115
2009-09-15 02:18:19 +02:00

33 lines
796 B
Vala

/* radare - LGPL - Copyright 2009 pancake<@nopcode.org> */
[CCode (cheader_filename="r_crypto.h", cprefix="r_crypto", lower_case_cprefix="r_crypto_")]
namespace Radare {
[Compact]
[CCode (cname="struct r_crypto_t", free_function="r_crypto_free", cprefix="r_crypto_")]
public class Crypto {
[CCode (cprefix="R_CRYPTO_DIR")]
public enum Direction {
CIPHER,
UNCIPHER
}
[CCode (cprefix="R_CRYPTO_MODE")]
public enum Mode {
ECB,
CBC,
OFB,
CFB
}
public Crypto();
public bool use(string algorithm);
public bool set_key(uint8 *key, Crypto.Mode mode, Crypto.Direction direction);
public bool set_iv(uint8 *iv);
public int get_key_size();
public int update(uint8 *buf, int len);
public int final(uint8 *buf, int len);
public uint8* get_output();
}
}