"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libcanlock/include/sha.h" between
tin-2.4.5.tar.xz and tin-2.6.0.tar.xz

About: TIN is a threaded NNTP and spool based UseNet newsreader.

sha.h  (tin-2.4.5.tar.xz):sha.h  (tin-2.6.0.tar.xz)
skipping to change at line 42 skipping to change at line 42
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _SHA_H_ #ifndef _SHA_H_
#define _SHA_H_ #define _SHA_H_
#pragma GCC visibility push(internal)
/* /*
* Description: * Description:
* This file implements the Secure Hash Algorithms * This file implements the Secure Hash Algorithms
* as defined in the U.S. National Institute of Standards * as defined in the U.S. National Institute of Standards
* and Technology Federal Information Processing Standards * and Technology Federal Information Processing Standards
* Publication (FIPS PUB) 180-3 published in October 2008 * Publication (FIPS PUB) 180-3 published in October 2008
* and formerly defined in its predecessors, FIPS PUB 180-1 * and formerly defined in its predecessors, FIPS PUB 180-1
* and FIP PUB 180-2. * and FIP PUB 180-2.
* *
* A combined document showing all algorithms is available at * A combined document showing all algorithms is available at
skipping to change at line 306 skipping to change at line 308
#if 0 /* not used */ #if 0 /* not used */
extern int USHAHashSizeBits(enum SHAversion whichSha); extern int USHAHashSizeBits(enum SHAversion whichSha);
#endif /* 0 */ #endif /* 0 */
extern const char *USHAHashName(enum SHAversion whichSha); extern const char *USHAHashName(enum SHAversion whichSha);
/* /*
* HMAC Keyed-Hashing for Message Authentication, RFC 2104, * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
* for all SHAs. * for all SHAs.
* This interface allows a fixed-length text input to be used. * This interface allows a fixed-length text input to be used.
*/ */
extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */ extern int RFC2104Hmac(SHAversion whichSha, /* which SHA algorithm to use */
const unsigned char *text, /* pointer to data stream */ const unsigned char *text, /* pointer to data stream */
int text_len, /* length of data stream */ int text_len, /* length of data stream */
const unsigned char *key, /* pointer to authentication key */ const unsigned char *key, /* pointer to authentication key */
int key_len, /* length of authentication key */ int key_len, /* length of authentication key */
uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */ uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */
/* /*
* HMAC Keyed-Hashing for Message Authentication, RFC 2104, * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
* for all SHAs. * for all SHAs.
* This interface allows any length of text input to be used. * This interface allows any length of text input to be used.
*/ */
extern int hmacReset(HMACContext *context, enum SHAversion whichSha, extern int RFC2104HmacReset(HMACContext *context, enum SHAversion whichSha,
const unsigned char *key, int key_len); const unsigned char *key, int key_len);
extern int hmacInput(HMACContext *context, const unsigned char *text, extern int RFC2104HmacInput(HMACContext *context, const unsigned char *text,
int text_len); int text_len);
extern int hmacFinalBits(HMACContext *context, uint8_t bits, extern int RFC2104HmacFinalBits(HMACContext *context, uint8_t bits,
unsigned int bit_count); unsigned int bit_count);
extern int hmacResult(HMACContext *context, extern int RFC2104HmacResult(HMACContext *context,
uint8_t digest[USHAMaxHashSize]); uint8_t digest[USHAMaxHashSize]);
/* /*
* HKDF HMAC-based Extract-and-Expand Key Derivation Function, * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
* RFC 5869, for all SHAs. * RFC 5869, for all SHAs.
*/ */
extern int hkdf(SHAversion whichSha, const unsigned char *salt, extern int RFC5869Hkdf(SHAversion whichSha, const unsigned char *salt,
int salt_len, const unsigned char *ikm, int ikm_len, int salt_len, const unsigned char *ikm, int ikm_len,
const unsigned char *info, int info_len, const unsigned char *info, int info_len,
uint8_t okm[ ], int okm_len); uint8_t okm[ ], int okm_len);
extern int hkdfExtract(SHAversion whichSha, const unsigned char *salt, extern int RFC5869HkdfExtract(SHAversion whichSha, const unsigned char *salt,
int salt_len, const unsigned char *ikm, int salt_len, const unsigned char *ikm,
int ikm_len, uint8_t prk[USHAMaxHashSize]); int ikm_len, uint8_t prk[USHAMaxHashSize]);
extern int hkdfExpand(SHAversion whichSha, const uint8_t prk[ ], extern int RFC5869HkdfExpand(SHAversion whichSha, const uint8_t prk[ ],
int prk_len, const unsigned char *info, int prk_len, const unsigned char *info,
int info_len, uint8_t okm[ ], int okm_len); int info_len, uint8_t okm[ ], int okm_len);
/* /*
* HKDF HMAC-based Extract-and-Expand Key Derivation Function, * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
* RFC 5869, for all SHAs. * RFC 5869, for all SHAs.
* This interface allows any length of text input to be used. * This interface allows any length of text input to be used.
*/ */
extern int hkdfReset(HKDFContext *context, enum SHAversion whichSha, extern int RFC5869HkdfReset(HKDFContext *context, enum SHAversion whichSha,
const unsigned char *salt, int salt_len); const unsigned char *salt, int salt_len);
extern int hkdfInput(HKDFContext *context, const unsigned char *ikm, extern int RFC5869HkdfInput(HKDFContext *context, const unsigned char *ikm,
int ikm_len); int ikm_len);
extern int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits, extern int RFC5869HkdfFinalBits(HKDFContext *context, uint8_t ikm_bits,
unsigned int ikm_bit_count); unsigned int ikm_bit_count);
extern int hkdfResult(HKDFContext *context, extern int RFC5869HkdfResult(HKDFContext *context,
uint8_t prk[USHAMaxHashSize], uint8_t prk[USHAMaxHashSize],
const unsigned char *info, int info_len, const unsigned char *info, int info_len,
uint8_t okm[USHAMaxHashSize], int okm_len); uint8_t okm[USHAMaxHashSize], int okm_len);
#pragma GCC visibility pop
#endif /* _SHA_H_ */ #endif /* _SHA_H_ */
 End of changes. 5 change blocks. 
34 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)