Changeset 34431 in project


Ignore:
Timestamp:
08/27/17 21:58:39 (4 weeks ago)
Author:
kon
Message:

rel 3.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/message-digest

    r34399 r34431  
    7676phase but this detail is hidden from the user.)
    7777
    78 {{UPDATE}} is a {{(procedure (<CONTEXT> <BLOB> <COUNT>))}}. Must accumulate
    79 the {{<BLOB>}}. Will be called zero or more times.
     78{{<SOURCE>}} is <BLOB>|<STRING>.
     79
     80{{UPDATE}} is a {{(procedure (<CONTEXT> <SOURCE> <COUNT>))}}. Must
     81accumulate the {{<SOURCE>}}, beginning at {{0}}, for {{<COUNT>}} bytes.
     82Will be called zero or more times.
    8083
    8184The foreign type specifier {{scheme-pointer}} is suitable as a foreign-lambda
    82 argument type for the {{<BLOB>}} argument since the data-region is a
     85argument type for the {{<SOURCE>}} argument since the data-region is a
    8386contiguous array of bytes.
    8487
    85 {{<COUNT>}} is the actual number of bytes in the {{<BLOB>}}. Since this value
    86 is supplied it means only the first {{<COUNT>}} bytes in the {{<BLOB>}} are
    87 valid.
    88 
    89 {{FINAL}} is a {{(procedure (<CONTEXT> <BLOB>))}}. Must build the
    90 message-digest result in the supplied result {{<BLOB>}}, which will have a
    91 length of at least {{DIGEST-LENGTH}}.
    92 
    93 ('''Note''' that {{INIT}}, {{UPDATE}}/{{RAW-UPDATE}} & {{FINAL}} are side-effecting
    94 procedures!)
     88{{<COUNT>}} is the actual number of bytes in the {{<SOURCE>}}. Since this
     89value is supplied it means only the first {{<COUNT>}} bytes in the
     90{{<SOURCE>}} are valid.
     91
     92{{<DESTINATION>}} is <BLOB>|<STRING>.
     93
     94{{FINAL}} is a {{(procedure (<CONTEXT> <source>))}}. Must build the
     95message-digest result in the supplied result {{<DESTINATION>}}, which will
     96have a length/size of at least {{DIGEST-LENGTH}}.
     97
     98('''Note''' that {{INIT}}, {{UPDATE}}/{{RAW-UPDATE}} & {{FINAL}} are
     99side-effecting procedures!)
    95100
    96101{{BLOCK-LENGTH}} must be a positive {{fixnum}} and identifies the message
     
    102107uninterned {{symbol}}.
    103108
    104 {{RAW-UPDATE}} is a {{(procedure (<CONTEXT> <POINTER> <COUNT>))}}. Must
    105 accumulate the memory at {{<POINTER>}}. Will be called zero or more times.
     109{{RAW-UPDATE}} is a {{(procedure (<CONTEXT> <POINTER> <COUNT>))}}.
     110Must accumulate the memory at {{<POINTER>}}, beginning at {{0}}, for
     111{{<COUNT>}} bytes. Will be called zero or more times.
    106112
    107113
     
    136142; {{procedure}} : updates with {{<buffer>}} = {{(procedure)}} until {{#f = (procedure)}}.
    137143; {{input-port}} : like {{procedure}} above but from {{((message-digest-chunk-read-maker) SOURCE)}}.
     144; {{pointer}} : {{<buffer>}} = {{SOURCE}}, thru the digest primitive raw-update.
    138145; {{*}} : {{<buffer>}} = {{(message-digest-chunk-converter SOURCE)}}.
    139146
     
    298305==== message-digest-update-blob
    299306
    300 <procedure>(message-digest-update-blob DIGEST BLOB)</procedure>
    301 
    302 Update the {{DIGEST}} with a {{BLOB}}.
     307<procedure>(message-digest-update-blob DIGEST BLOB [START [END]])</procedure>
     308
     309Update the {{DIGEST}} with a {{BLOB}}, optionally sliced by {{START END}}.
    303310
    304311==== message-digest-update-string
    305312
    306 <procedure>(message-digest-update-string DIGEST STRING)</procedure>
    307 
    308 Update the {{DIGEST}} with a {{STRING}}.
     313<procedure>(message-digest-update-string DIGEST STRING [START [END]])</procedure>
     314
     315Update the {{DIGEST}} with a {{STRING}}, optionally sliced by {{START END}}.
    309316
    310317==== message-digest-update-substring (DEPRECATED)
     
    316323==== message-digest-string
    317324
    318 <procedure>(message-digest-string PRIM STRING [RESULT-FORM]) => *</procedure>
     325<procedure>(message-digest-string PRIM STRING [RESULT-FORM [START [END]]]) => *</procedure>
    319326
    320327Returns the {{RESULT}} for the digest algorithm {{PRIM}} applied to
    321 {{STRING}} in the {{RESULT-FORM}}.
     328{{STRING}}, optionally sliced by {{START END}}, in the {{RESULT-FORM}}.
    322329
    323330{{RESULT-FORM}} default is {{(message-digest-result-form)}}.
     
    327334==== message-digest-blob
    328335
    329 <procedure>(message-digest-blob PRIM BLOB [RESULT-FORM]) => *</procedure>
     336<procedure>(message-digest-blob PRIM BLOB [RESULT-FORM [START [END]]]) => *</procedure>
    330337
    331338Returns the {{<result>}} for the digest algorithm {{PRIM}} applied to
    332 {{BLOB}} in the {{RESULT-FORM}}.
    333 
    334 {{RESULT-FORM}} default is {{(message-digest-result-form)}}.
     339{{BLOB}}, optionally sliced by {{START END}}, in the {{RESULT-FORM}}.
     340
     341{{RESULT-FORM}} default is {{(message-digest-result-form)}}.
     342
     343Performs all three phases.
     344
     345==== message-digest-string!
     346
     347<procedure>(message-digest-string! PRIM STRING BUFFER [START [END]]) => *</procedure>
     348
     349Returns the {{RESULT}} for the digest algorithm {{PRIM}} applied to
     350{{STRING}}, optionally sliced by {{START END}}, in the {{BUFFER}}.
     351
     352Performs all three phases.
     353
     354==== message-digest-blob!
     355
     356<procedure>(message-digest-blob! PRIM BLOB BUFFER [START [END]]) => *</procedure>
     357
     358Returns the {{<result>}} for the digest algorithm {{PRIM}} applied to
     359{{BLOB}}, optionally sliced by {{START END}}, in the {{{BUFFER}}}.
    335360
    336361Performs all three phases.
     
    478503==== message-digest-update-object
    479504
    480 <procedure>(message-digest-update-object DIGEST SOURCE)</procedure>
     505<procedure>(message-digest-update-object DIGEST SOURCE [START [END]])</procedure>
    481506
    482507Update the {{DIGEST}} with some {{SOURCE}}.
     
    487512can convert into a {{<byte-source>}}.
    488513
     514If supplied, and possible, the {{<byte-source>}} is sliced by {{START END}}.
    489515
    490516=== Message Digest Item
     
    500526==== message-digest-object
    501527
    502 <procedure>(message-digest-object PRIM SOURCE [RESULT-FORM]) => *</procedure>
     528<procedure>(message-digest-object PRIM SOURCE [RESULT-FORM [START [END]]]) => *</procedure>
    503529
    504530Returns the result for the digest algorithm {{PRIM}} applied to
    505 {{SOURCE}} in the {{RESULT-FORM}}.
     531{{SOURCE}}, optionally sliced by {{START END}}, in the {{RESULT-FORM}}.
    506532
    507533{{RESULT-FORM}} default is {{(message-digest-result-form)}}.
     
    542568==== message-digest-update-u8vector
    543569
    544 <procedure>(message-digest-update-u8vector DIGEST U8VECTOR)</procedure>
    545 
    546 Update the {{DIGEST}} with a {{U8VECTOR}}.
     570<procedure>(message-digest-update-u8vector DIGEST U8VECTOR [START [END]])</procedure>
     571
     572Update the {{DIGEST}} with a {{U8VECTOR}}, optionally sliced by {{START END}}.
     573
     574==== message-digest-u8vector
     575
     576<procedure>(message-digest-u8vector PRIM U8VECTOR [RESULT-FORM [START [END]]]) => *</procedure>
     577
     578Returns the result for the digest algorithm {{PRIM}} applied to
     579{{U8VECTOR}}, optionally sliced by {{START END}}, in the {{RESULT-FORM}}.
     580
     581{{RESULT-FORM}} default is {{(message-digest-result-form)}}.
     582
     583Performs all three phases.
     584
     585==== message-digest-u8vector!
     586
     587<procedure>(message-digest-u8vector! PRIM U8VECTOR BUFFER [START [END]]) => *</procedure>
     588
     589Returns the result for the digest algorithm {{PRIM}} applied to
     590{{U8VECTOR}}, optionally sliced by {{START END}}, in the {{BUFFER}}.
     591
     592Performs all three phases.
    547593
    548594==== message-digest-update-subu8vector (DEPRECATED)
     
    561607The {{LENGTH}} is the byte count. Default is the size in bytes of the
    562608{{BYTEVECTOR}}.
    563 
    564 ==== message-digest-u8vector
    565 
    566 <procedure>(message-digest-u8vector PRIM U8VECTOR [RESULT-FORM]) => *</procedure>
    567 
    568 Returns the result for the digest algorithm {{PRIM}} applied to
    569 {{U8VECTOR}} in the {{RESULT-FORM}}.
    570 
    571 {{RESULT-FORM}} default is {{(message-digest-result-form)}}.
    572 
    573 Performs all three phases.
    574609
    575610
     
    709744== Version history
    710745
     746; 3.6.0 : Add {{START}} and/or {{END}} optional arguments.
    711747; 3.5.0 : Add {{finalize-message-digest!}}.
    712748; 3.4.0 : Deprecate {{message-digest-chunk-read-maker}}. Add {{message-digest-chunk-port-read-maker}}, {{message-digest-chunk-fileno-read-maker}}. Add {{message-digest-primitive-raw-update}}.
Note: See TracChangeset for help on using the changeset viewer.