radare2/libr/vapi/r_hash.vapi
pancake 54bdfb22bd * Uppsercase classnames (rCore -> RCore)
- Fixes ruby warnings
  - Follow java syntax conventions
  - Helped to identify and fix bugs in many vapis
  - Sync swig examples
  - Add test-r_core.rb (ruby test for RCore)
* Some work in r_cons, some refactoring and cleanup
  - scr.html is now working again
  - w32 cons support should work now
  - Rename r_cons_get_columns -> r_cons_get_size()
  - But it needs more work
* Typedef all r_range, r_parse and r_anal structs
  - Add missing r_lib.pc in configure.acr
* 'make' clean now removes the libr* in swig/${LANG}/
2010-01-26 01:28:33 +01:00

52 lines
1.5 KiB
Vala

/* radare - LGPL - Copyright 2009-2010 pancake<@nopcode.org> */
/* This vapi has been manually generated by me */
[Compact]
[CCode (cheader_filename="r_hash.h", cprefix="r_hash_", cname="struct r_hash_t", free_function="r_hash_free")]
public class Radare.RHash {
[CCode (cprefix="R_HASH_")]
[Flags]
public enum Algorithm {
ALL = 0,
MD5 = 1,
SHA1 = 2,
SHA256 = 4,
SHA384 = 8,
SHA512 = 16,
}
[CCode (cprefix="R_HASH_SIZE_", cname="int")]
public enum Size {
MD4 = 16,
MD5 = 16,
SHA1 = 16,
SHA256 = 32,
SHA384 = 64,
SHA512 = 64,
}
/* checksum */
public static uint16 crc16(uint16 crc, uint8 *buf, uint64 len);
public static uint32 crc32(uint8 *buf, uint64 len);
public static uint16 xor(uint8 *buf, uint64 len);
public static uint32 xorpair(uint8 *buf, uint64 len);
public static uint8 parity(uint8 *buf, uint64 len);
public static uint8 mod255(uint8 *buf, uint64 len);
/* analitics */
public static uint8 hamdist(uint8 *buf, uint64 len);
public static double entropy(uint8 *buf, uint64 len);
public static int pcprint(uint8 *buf, uint64 len);
/* methods */
public RHash(bool rst);
// public void init(int rst, Algorithm bits);
public void init(bool rst, int bits);
public uint8 *do_md4(uint8 *input, uint32 len);
public uint8 *do_md5(uint8 *input, uint32 len);
public uint8 *do_sha1(uint8 *input, uint32 len);
public uint8 *do_sha256(uint8 *input, uint32 len);
public uint8 *do_sha384(uint8 *input, uint32 len);
public uint8 *do_sha512(uint8 *input, uint32 len);
}