equal
deleted
inserted
replaced
379 |
379 |
380 %{ |
380 %{ |
381 int len, offs; |
381 int len, offs; |
382 int objSize, nInstVars, nInstBytes; |
382 int objSize, nInstVars, nInstBytes; |
383 char *extPtr; |
383 char *extPtr; |
384 OBJ oClass; |
384 |
385 |
385 if (__isNonNilObject(__INST(hashContext)) |
386 if (__isNonNilObject(__INST(hashContext)) |
|
387 &&__qClass(__INST(hashContext)) == @global(ByteArray) |
386 &&__qClass(__INST(hashContext)) == @global(ByteArray) |
388 &&__byteArraySize(__INST(hashContext)) == sizeof(MD5_CTX) |
387 &&__byteArraySize(__INST(hashContext)) == sizeof(MD5_CTX) |
389 && __bothSmallInteger(count, start) |
388 && __bothSmallInteger(count, start) |
390 ) { |
389 ) { |
391 MD5_CTX *ctx = |
390 MD5_CTX *ctx = |
392 (MD5_CTX *)__ByteArrayInstPtr(__INST(hashContext))->ba_element; |
391 (MD5_CTX *)__ByteArrayInstPtr(__INST(hashContext))->ba_element; |
393 |
392 |
394 len = __intVal(count); |
393 len = __intVal(count); |
395 offs = __intVal(start) - 1; |
394 offs = __intVal(start) - 1; |
396 |
395 |
397 oClass = __Class(anObject); |
396 if (__isExternalBytesLike(anObject)) { |
398 if (oClass == ExternalBytes) { |
|
399 OBJ sz; |
397 OBJ sz; |
400 |
398 |
401 nInstBytes = 0; |
399 nInstBytes = 0; |
402 extPtr = (char *)__externalBytesAddress(anObject); |
400 extPtr = (char *)__externalBytesAddress(anObject); |
403 sz = __externalBytesSize(anObject); |
401 sz = __externalBytesSize(anObject); |
405 objSize = __intVal(sz); |
403 objSize = __intVal(sz); |
406 } else { |
404 } else { |
407 objSize = 0; /* unknown */ |
405 objSize = 0; /* unknown */ |
408 } |
406 } |
409 } else { |
407 } else { |
|
408 OBJ oClass; |
|
409 |
|
410 oClass = __Class(anObject); |
410 switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) { |
411 switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) { |
411 case BYTEARRAY: |
412 case BYTEARRAY: |
412 case WORDARRAY: |
413 case WORDARRAY: |
413 case LONGARRAY: |
414 case LONGARRAY: |
414 case SWORDARRAY: |
415 case SWORDARRAY: |
436 ! ! |
437 ! ! |
437 |
438 |
438 !MD5Stream class methodsFor:'documentation'! |
439 !MD5Stream class methodsFor:'documentation'! |
439 |
440 |
440 version |
441 version |
441 ^ '$Header: /cvs/stx/stx/libbasic/MD5Stream.st,v 1.3 2003-02-19 17:09:46 stefan Exp $' |
442 ^ '$Header: /cvs/stx/stx/libbasic/MD5Stream.st,v 1.4 2003-04-10 23:34:56 cg Exp $' |
442 ! ! |
443 ! ! |
443 |
444 |
444 MD5Stream initialize! |
445 MD5Stream initialize! |