"Westdorp, Tom" wrote:
> ...
>
> Results are:
> In the RPGIV program running debug:
> PIN# = '1211'
> P_PIN# = SPP:FB9124C12F001B48
> eval p_pin#:x 10 gets 00000     F1F2F1F1 00...... ........ ........   -
> 1211............
>
> in the C program:
> buf    = SPP:FB9124C12F001B48
> eval buf:x 10 gets    00000     80000000 00...... ........ ........   -
> ...............
>
>

Tom, this is a difference in debugging behaviour.  With the RPG
debugger, :x for a pointer means to show the contents of the pointer in
hex.  (:c for a pointer means to show its contents as character.)

With the C debugger, :x for a pointer means to show the pointer value in
hex.  To see the contents of the pointer, use *buf.

eval *buf:x 10

To save yourself some trouble, prototype your char * pointer as

D Sha1            PR                  ExtProc('sha1')
D  Buffer                         *   Value Options(*String)

Then get rid of your PIN# and p_PIN# temps and just do

   Sha1(PIN: 4 : pdiv : r_digest);




This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].