summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/px.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/px.h')
-rw-r--r--contrib/pgcrypto/px.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h
index 257d6015bc..c916e9361c 100644
--- a/contrib/pgcrypto/px.h
+++ b/contrib/pgcrypto/px.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $PostgreSQL: pgsql/contrib/pgcrypto/px.h,v 1.18 2007/08/23 16:15:51 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/pgcrypto/px.h,v 1.19 2009/06/11 14:48:52 momjian Exp $
*/
#ifndef __PX_H
@@ -116,12 +116,12 @@ typedef struct px_combo PX_Combo;
struct px_digest
{
- unsigned (*result_size) (PX_MD * h);
- unsigned (*block_size) (PX_MD * h);
- void (*reset) (PX_MD * h);
- void (*update) (PX_MD * h, const uint8 *data, unsigned dlen);
- void (*finish) (PX_MD * h, uint8 *dst);
- void (*free) (PX_MD * h);
+ unsigned (*result_size) (PX_MD *h);
+ unsigned (*block_size) (PX_MD *h);
+ void (*reset) (PX_MD *h);
+ void (*update) (PX_MD *h, const uint8 *data, unsigned dlen);
+ void (*finish) (PX_MD *h, uint8 *dst);
+ void (*free) (PX_MD *h);
/* private */
union
{
@@ -138,13 +138,13 @@ struct px_alias
struct px_hmac
{
- unsigned (*result_size) (PX_HMAC * h);
- unsigned (*block_size) (PX_HMAC * h);
- void (*reset) (PX_HMAC * h);
- void (*update) (PX_HMAC * h, const uint8 *data, unsigned dlen);
- void (*finish) (PX_HMAC * h, uint8 *dst);
- void (*free) (PX_HMAC * h);
- void (*init) (PX_HMAC * h, const uint8 *key, unsigned klen);
+ unsigned (*result_size) (PX_HMAC *h);
+ unsigned (*block_size) (PX_HMAC *h);
+ void (*reset) (PX_HMAC *h);
+ void (*update) (PX_HMAC *h, const uint8 *data, unsigned dlen);
+ void (*finish) (PX_HMAC *h, uint8 *dst);
+ void (*free) (PX_HMAC *h);
+ void (*init) (PX_HMAC *h, const uint8 *key, unsigned klen);
PX_MD *md;
/* private */
@@ -157,14 +157,14 @@ struct px_hmac
struct px_cipher
{
- unsigned (*block_size) (PX_Cipher * c);
- unsigned (*key_size) (PX_Cipher * c); /* max key len */
- unsigned (*iv_size) (PX_Cipher * c);
-
- int (*init) (PX_Cipher * c, const uint8 *key, unsigned klen, const uint8 *iv);
- int (*encrypt) (PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res);
- int (*decrypt) (PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res);
- void (*free) (PX_Cipher * c);
+ unsigned (*block_size) (PX_Cipher *c);
+ unsigned (*key_size) (PX_Cipher *c); /* max key len */
+ unsigned (*iv_size) (PX_Cipher *c);
+
+ int (*init) (PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv);
+ int (*encrypt) (PX_Cipher *c, const uint8 *data, unsigned dlen, uint8 *res);
+ int (*decrypt) (PX_Cipher *c, const uint8 *data, unsigned dlen, uint8 *res);
+ void (*free) (PX_Cipher *c);
/* private */
void *ptr;
int pstat; /* mcrypt uses it */
@@ -172,24 +172,24 @@ struct px_cipher
struct px_combo
{
- int (*init) (PX_Combo * cx, const uint8 *key, unsigned klen,
+ int (*init) (PX_Combo *cx, const uint8 *key, unsigned klen,
const uint8 *iv, unsigned ivlen);
- int (*encrypt) (PX_Combo * cx, const uint8 *data, unsigned dlen,
+ int (*encrypt) (PX_Combo *cx, const uint8 *data, unsigned dlen,
uint8 *res, unsigned *rlen);
- int (*decrypt) (PX_Combo * cx, const uint8 *data, unsigned dlen,
+ int (*decrypt) (PX_Combo *cx, const uint8 *data, unsigned dlen,
uint8 *res, unsigned *rlen);
- unsigned (*encrypt_len) (PX_Combo * cx, unsigned dlen);
- unsigned (*decrypt_len) (PX_Combo * cx, unsigned dlen);
- void (*free) (PX_Combo * cx);
+ unsigned (*encrypt_len) (PX_Combo *cx, unsigned dlen);
+ unsigned (*decrypt_len) (PX_Combo *cx, unsigned dlen);
+ void (*free) (PX_Combo *cx);
PX_Cipher *cipher;
unsigned padding;
};
-int px_find_digest(const char *name, PX_MD ** res);
-int px_find_hmac(const char *name, PX_HMAC ** res);
-int px_find_cipher(const char *name, PX_Cipher ** res);
-int px_find_combo(const char *name, PX_Combo ** res);
+int px_find_digest(const char *name, PX_MD **res);
+int px_find_hmac(const char *name, PX_HMAC **res);
+int px_find_cipher(const char *name, PX_Cipher **res);
+int px_find_combo(const char *name, PX_Combo **res);
int px_get_random_bytes(uint8 *dst, unsigned count);
int px_get_pseudo_random_bytes(uint8 *dst, unsigned count);
@@ -199,7 +199,7 @@ unsigned px_acquire_system_randomness(uint8 *dst);
const char *px_strerror(int err);
-const char *px_resolve_alias(const PX_Alias * aliases, const char *name);
+const char *px_resolve_alias(const PX_Alias *aliases, const char *name);
void px_set_debug_handler(void (*handler) (const char *));