diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-04-10 12:57:07 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-04-10 13:02:56 +0200 |
commit | c699b9ca94ed49d09250058a6ec0e762f4ab2faa (patch) | |
tree | 9d05ed1339b254294966a9fea62ae59d4b92a9cc /include | |
parent | 53586ed4ba43225e140791812074e4b21d7b2726 (diff) | |
download | libssh-c699b9ca94ed49d09250058a6ec0e762f4ab2faa.tar.gz libssh-c699b9ca94ed49d09250058a6ec0e762f4ab2faa.tar.xz libssh-c699b9ca94ed49d09250058a6ec0e762f4ab2faa.zip |
external: Use standard int types
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/blf.h | 30 | ||||
-rw-r--r-- | include/libssh/pki_priv.h | 10 |
2 files changed, 23 insertions, 17 deletions
diff --git a/include/libssh/blf.h b/include/libssh/blf.h index cd74c8b6..21185f31 100644 --- a/include/libssh/blf.h +++ b/include/libssh/blf.h @@ -51,8 +51,8 @@ /* Blowfish context */ typedef struct BlowfishContext { - u_int32_t S[4][256]; /* S-Boxes */ - u_int32_t P[BLF_N + 2]; /* Subkeys */ + uint32_t S[4][256]; /* S-Boxes */ + uint32_t P[BLF_N + 2]; /* Subkeys */ } blf_ctx; /* Raw access to customized Blowfish @@ -61,27 +61,27 @@ typedef struct BlowfishContext { * Blowfish_expand0state( state, key, keylen ) */ -void Blowfish_encipher(blf_ctx *, u_int32_t *, u_int32_t *); -void Blowfish_decipher(blf_ctx *, u_int32_t *, u_int32_t *); +void Blowfish_encipher(blf_ctx *, uint32_t *, uint32_t *); +void Blowfish_decipher(blf_ctx *, uint32_t *, uint32_t *); void Blowfish_initstate(blf_ctx *); -void Blowfish_expand0state(blf_ctx *, const u_int8_t *, u_int16_t); +void Blowfish_expand0state(blf_ctx *, const uint8_t *, uint16_t); void Blowfish_expandstate -(blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t); +(blf_ctx *, const uint8_t *, uint16_t, const uint8_t *, uint16_t); /* Standard Blowfish */ -void blf_key(blf_ctx *, const u_int8_t *, u_int16_t); -void blf_enc(blf_ctx *, u_int32_t *, u_int16_t); -void blf_dec(blf_ctx *, u_int32_t *, u_int16_t); +void blf_key(blf_ctx *, const uint8_t *, uint16_t); +void blf_enc(blf_ctx *, uint32_t *, uint16_t); +void blf_dec(blf_ctx *, uint32_t *, uint16_t); -void blf_ecb_encrypt(blf_ctx *, u_int8_t *, u_int32_t); -void blf_ecb_decrypt(blf_ctx *, u_int8_t *, u_int32_t); +void blf_ecb_encrypt(blf_ctx *, uint8_t *, uint32_t); +void blf_ecb_decrypt(blf_ctx *, uint8_t *, uint32_t); -void blf_cbc_encrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); -void blf_cbc_decrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); +void blf_cbc_encrypt(blf_ctx *, uint8_t *, uint8_t *, uint32_t); +void blf_cbc_decrypt(blf_ctx *, uint8_t *, uint8_t *, uint32_t); -/* Converts u_int8_t to u_int32_t */ -u_int32_t Blowfish_stream2word(const u_int8_t *, u_int16_t , u_int16_t *); +/* Converts uint8_t to uint32_t */ +uint32_t Blowfish_stream2word(const uint8_t *, uint16_t , uint16_t *); #endif /* !defined(HAVE_BCRYPT_PBKDF) && !defined(HAVE_BLH_H) */ #endif /* _BLF_H */ diff --git a/include/libssh/pki_priv.h b/include/libssh/pki_priv.h index 213e147a..5acb02a8 100644 --- a/include/libssh/pki_priv.h +++ b/include/libssh/pki_priv.h @@ -22,9 +22,15 @@ #define PKI_PRIV_H_ #include "libssh/pki.h" + /* defined in bcrypt_pbkdf.c */ -int bcrypt_pbkdf(const char *pass, size_t passlen, const u_int8_t *salt, - size_t saltlen, u_int8_t *key, size_t keylen, unsigned int rounds); +int bcrypt_pbkdf(const char *pass, + size_t passlen, + const uint8_t *salt, + size_t saltlen, + uint8_t *key, + size_t keylen, + unsigned int rounds); #define RSA_HEADER_BEGIN "-----BEGIN RSA PRIVATE KEY-----" #define RSA_HEADER_END "-----END RSA PRIVATE KEY-----" |