2
* This file is a part of Java Bindings for Librhash
3
* Copyright (c) 2011-2012, Sergey Basalaev <sbasalaev@gmail.com>
4
* Librhash is (c) 2011-2012, Aleksey Kravchenko <rhash.admin@gmail.com>
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to deal
8
* in the Software without restriction, including without limitation the rights
9
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
* copies of the Software, and to permit persons to whom the Software is
13
* This library is distributed in the hope that it will be useful, but WITHOUT
14
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
* FOR A PARTICULAR PURPOSE. Use it at your own risk!
18
/* This is convenient structure to hold message digest. */
26
unsigned char *hash_data;
29
typedef DigestStruct* Digest;
32
* Frees memory occupated by Digest.
33
* @param obj object to free
35
void freeDigest(Digest obj);
38
* Compares two Digest instances.
39
* @param obj1 first object to compare
40
* @param obj2 second object to compare
41
* @return 1 if objects are equal, 0 otherwise
43
int compareDigests(Digest obj1, Digest obj2);
46
* Calculates hashcode for Digest.
47
* @param obj object to calculate hash code
49
int hashcodeForDigest(Digest obj);