Common Lisp Package: PG-MD5

README:

FUNCTION

Public

FILL-BLOCK

Convert a complete 64 byte input vector segment into the given 16 word MD5 block. This currently works on (unsigned-byte 8) and character simple-arrays, via the functions `fill-block-ub8' and `fill-block-char' respectively.

FILL-BLOCK-CHAR

Convert a complete 64 character input string segment starting from offset into the given 16 word MD5 block.

FILL-BLOCK-UB8

Convert a complete 64 (unsigned-byte 8) input vector segment starting from offset into the given 16 word MD5 block.

FINALIZE-MD5-STATE

If the given md5-state has not already been finalized, finalize it, by processing any remaining input in its buffer, with suitable padding and appended bit-length, as specified by the MD5 standard. The resulting MD5 message-digest is returned as an array of sixteen (unsigned-byte 8) values. Calling `update-md5-state' after a call to `finalize-md5-state' results in unspecified behaviour.

INITIAL-MD5-REGS

Create the initial working state of an MD5 run.

MD5REGS-DIGEST

Create the final 16 byte message-digest from the MD5 working state in regs. Returns a (simple-array (unsigned-byte 8) (16)).

MD5SUM-FILE (PATHNAME)

Calculate the MD5 message-digest of the file designated by pathname.

MD5SUM-SEQUENCE (SEQUENCE &KEY (START 0) END)

Calculate the MD5 message-digest of data bounded by START and END in SEQUENCE , which must be a vector with element-type (UNSIGNED-BYTE 8).

MD5SUM-STREAM (STREAM)

Calculate an MD5 message-digest of the contents of STREAM, whose element-type has to be (UNSIGNED-BYTE 8).

UPDATE-MD5-BLOCK

This is the core part of the MD5 algorithm. It takes a complete 16 word block of input, and updates the working state in A, B, C, and D accordingly.

UPDATE-MD5-STATE

Update the given md5-state from sequence, which is either a simple-string or a simple-array with element-type (unsigned-byte 8), bounded by start and end, which must be numeric bounding-indices.

Undocumented

MAKE-MD5-STATE

MD5-STATE-P (OBJECT)

Private

COPY-TO-BUFFER

Copy a partial segment from input vector from starting at from-offset and copying count elements into the 64 byte buffer starting at buffer-offset.

MD5-STATE-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-STATE-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-STATE-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-STATE-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-STATE-FINALIZED-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-STATE-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

COPY-MD5-STATE (INSTANCE)

F

G

H

I

SETFMD5-STATE-AMOUNT (NEW-VALUE INSTANCE)

SETFMD5-STATE-BUFFER-INDEX (NEW-VALUE INSTANCE)

SETFMD5-STATE-FINALIZED-P (NEW-VALUE INSTANCE)

MOD32+

ROL32

MACRO

Private

ASSEMBLE-UB32 (A B C D)

Assemble an ub32 value from the given (unsigned-byte 8) values, where a is the intended low-order byte and d the high-order byte.

Undocumented

MD5-REGS-A (REGS)

MD5-REGS-B (REGS)

MD5-REGS-C (REGS)

MD5-REGS-D (REGS)

WITH-MD5-ROUND ((OP BLOCK) &REST CLAUSES)

VARIABLE

Private

Undocumented

*T*

CLASS

Public

Undocumented

MD5-STATE

CONSTANT

Private

+BUFFER-SIZE+

Size of internal buffer to use for md5sum-stream and md5sum-file operations. This should be a multiple of 64, the MD5 block size.

+MD5-MAGIC-A+

Initial value of Register A of the MD5 working state.

+MD5-MAGIC-B+

Initial value of Register B of the MD5 working state.

+MD5-MAGIC-C+

Initial value of Register C of the MD5 working state.

+MD5-MAGIC-D+

Initial value of Register D of the MD5 working state.