;ELC
;;; Compiled by LTX@Xue-LingTaos-MacBook-Pro.local on Wed Mar 16 23:16:16 2011
;;; from file /Users/LTX/Projects/Emacs/emacs/lisp/net/hmac-def.el
;;; in Emacs version 24.0.50.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@445 Define a function NAME(TEXT KEY) which computes HMAC with function H.

HMAC function is H(KEY XOR opad, H(KEY XOR ipad, TEXT)):

H is a cryptographic hash function, such as SHA1 and MD5, which takes
a string and return a digest of it (in binary form).
B is a byte-length of a block size of H. (B=64 for both SHA1 and MD5.)
L is a byte-length of hash outputs. (L=16 for MD5, L=20 for SHA1.)
If BIT is non-nil, truncate output to specified bits.
(defalias 'define-hmac-function '(macro . #[(name H B L &optional bit) "\305\306\307\310!\226\311Q\312\313\314	\315BBD\316\314	\317BBD\320BB\321\322\323\324\325	E\326\327\n\330B\325\257E\331\326\313\332\313\321\n\333B\334BB\316\335\316\321\n\336B\337BB\257	\f\203[\f\340\245W\203[\341\316\342\f\340\245F\202\\\343\257\344BBE\257\207" [name B H L bit defun (text key) "Compute " symbol-name " over TEXT with KEY." let key-xor-ipad make-string (54) key-xor-opad (92) ((len (length key)) (pos 0)) unwind-protect progn if > len setq key (key) (while (< pos len) (aset key-xor-ipad pos (logxor (aref key pos) 54)) (aset key-xor-opad pos (logxor (aref key pos) 92)) (setq pos (1+ pos))) (unwind-protect (concat key-xor-ipad text) (fillarray key-xor-ipad 0)) (key-xor-ipad) ((fillarray key-xor-ipad 0)) (unwind-protect (concat key-xor-opad key-xor-ipad) (fillarray key-xor-opad 0)) (key-xor-opad) ((fillarray key-xor-opad 0)) 8 substring 0 (concat key-xor-opad) ((fillarray key-xor-ipad 0) (fillarray key-xor-opad 0))] 21 (#$ . 547)]))
(provide 'hmac-def)
