Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Checking a package for modifications

Re: Checking a package for modifications

From: <srallapally_at_netscape.net>
Date: Sun, 21 Feb 1999 20:40:50 GMT
Message-ID: <7apr0g$fb0$1@nnrp1.dejanews.com>


In article <qxqq$AAs0zz2EwPn_at_rwx777.demon.co.uk>,   Steve Haynes <steve_at_nospamrwx777.demon.co.uk> wrote:
> In article <7alpjs$96k$1_at_nnrp1.dejanews.com>, Fernando
> <fnantes_at_hotmail.com> writes
> >What I'm looking for is a way to find out if a package was modified without
> >having to compare the source code for differences. A checksum or something
> >like that. I've browsed the whole documentation and didn't find anything that
> >I could use, any ideas?

copied from technet.oracle.com. for those interested

checksum.sql

                  Last Updated on 24-JUN-98
     internet 1's complement checksum algorithm implemented in plsql



function checksum( p_buff in varchar2 ) return number is

    l_sum number default 0;
    l_n number;
begin

    for i in 1 .. trunc(length(p_buff||'x')/2) loop

        l_n := ascii(substr(p_buff||'x', 1+(i-1)*2, 1))*256 +
               ascii(substr(p_buff||'x', 2+(i-1)*2, 1));
        l_sum := mod(l_sum+l_n,4294967296);
    end loop;
    while ( l_sum > 65536 ) loop

        l_sum := bitand( l_sum, 65535 ) + trunc(l_sum/65536);     end loop;
    return l_sum;
end checksum;

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sun Feb 21 1999 - 14:40:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US