Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Good checksum component, anyone?

 
   Database Help (Home) -> DTS RSS
Next:  IIF statements  
Author Message
Gorm Braarvig

External


Since: Dec 20, 2008
Posts: 3



(Msg. 1) Posted: Sat Dec 20, 2008 11:38 am
Post subject: Good checksum component, anyone?
Archived from groups: microsoft>public>sqlserver>dts (more info?)

Hi!

I currently use conesans checksum component, but I need a md5-checksum
pushed into a bigint (I believe conesans uses crc-32).
Has anyone solved this?

regards,
Gorm Braarvig

 >> Stay informed about: Good checksum component, anyone? 
Back to top
Login to vote
Russell Fields

External


Since: Jan 10, 2008
Posts: 608



(Msg. 2) Posted: Mon Dec 22, 2008 4:59 pm
Post subject: Re: Good checksum component, anyone? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gorm,

Starting with SQL Server 2005 there is a HASHBYTES keyword that allows you
to choose from a set of methods and returns VARBINARY. It can be cast into
BIGINT, but it is not reversable.

The MD5 method returns 16 bytes, but BIGINT is only 8 bytes.

See the output of the following:

SELECT HASHBYTES('MD5','Gorm Braarvig') AS BINMD5,
CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT) AS BIGINTMD5,
CAST (CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT)
AS VARBINARY(8000)) AS BINAGAINMDF

Results:
0x647679B1F3F515655EC3B478951307CF 6828499890013931471 0x5EC3B478951307CF

Does that help?

RLF

"Gorm Braarvig" wrote in message

> Hi!
>
> I currently use conesans checksum component, but I need a md5-checksum
> pushed into a bigint (I believe conesans uses crc-32).
> Has anyone solved this?
>
> regards,
> Gorm Braarvig

 >> Stay informed about: Good checksum component, anyone? 
Back to top
Login to vote
Gorm Braarvig

External


Since: Dec 20, 2008
Posts: 3



(Msg. 3) Posted: Thu Dec 25, 2008 1:25 pm
Post subject: Re: Good checksum component, anyone? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Russel!

Can't use it, need to do it in the flow. I was thinking of merging the 16
bytes into 8 by xoring the two Int64 together, would be sufficient for most
(all?) applications.

Thanks,
Gorm

"Russell Fields" wrote in message
news:#7P7HCIZJHA.5312@TK2MSFTNGP02.phx.gbl...
> Gorm,
>
> Starting with SQL Server 2005 there is a HASHBYTES keyword that allows you
> to choose from a set of methods and returns VARBINARY. It can be cast
> into BIGINT, but it is not reversable.
>
> The MD5 method returns 16 bytes, but BIGINT is only 8 bytes.
>
> See the output of the following:
>
> SELECT HASHBYTES('MD5','Gorm Braarvig') AS BINMD5,
> CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT) AS BIGINTMD5,
> CAST (CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT)
> AS VARBINARY(8000)) AS BINAGAINMDF
>
> Results:
> 0x647679B1F3F515655EC3B478951307CF 6828499890013931471
> 0x5EC3B478951307CF
>
> Does that help?
>
> RLF
>
> "Gorm Braarvig" wrote in message
>
>> Hi!
>>
>> I currently use conesans checksum component, but I need a md5-checksum
>> pushed into a bigint (I believe conesans uses crc-32).
>> Has anyone solved this?
>>
>> regards,
>> Gorm Braarvig
>
 >> Stay informed about: Good checksum component, anyone? 
Back to top
Login to vote
Russell Fields

External


Since: Jan 10, 2008
Posts: 608



(Msg. 4) Posted: Thu Dec 25, 2008 2:56 pm
Post subject: Re: Good checksum component, anyone? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gorm,

Sorry, I don't know what to say. It strikes me as odd to feel it necessary
to use MD5, then to XOR the first 8 bytes on the second 8 bytes. I would
think that that certainly has to do something negative to the hash.

Maybe one of these will be useful to you. Google: MD5 Component

http://xstandard.com/en/documentation/xmd5/
http://www.download.com/MD5-Com-Component/3000-2383_4-10449255.html
http://www.traction-software.co.uk/devmd5/index.html

RLF

"Gorm Braarvig" wrote in message

> Hi Russel!
>
> Can't use it, need to do it in the flow. I was thinking of merging the 16
> bytes into 8 by xoring the two Int64 together, would be sufficient for
> most (all?) applications.
>
> Thanks,
> Gorm
>
> "Russell Fields" wrote in message
> news:#7P7HCIZJHA.5312@TK2MSFTNGP02.phx.gbl...
>> Gorm,
>>
>> Starting with SQL Server 2005 there is a HASHBYTES keyword that allows
>> you to choose from a set of methods and returns VARBINARY. It can be
>> cast into BIGINT, but it is not reversable.
>>
>> The MD5 method returns 16 bytes, but BIGINT is only 8 bytes.
>>
>> See the output of the following:
>>
>> SELECT HASHBYTES('MD5','Gorm Braarvig') AS BINMD5,
>> CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT) AS BIGINTMD5,
>> CAST (CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT)
>> AS VARBINARY(8000)) AS BINAGAINMDF
>>
>> Results:
>> 0x647679B1F3F515655EC3B478951307CF 6828499890013931471
>> 0x5EC3B478951307CF
>>
>> Does that help?
>>
>> RLF
>>
>> "Gorm Braarvig" wrote in message
>>
>>> Hi!
>>>
>>> I currently use conesans checksum component, but I need a md5-checksum
>>> pushed into a bigint (I believe conesans uses crc-32).
>>> Has anyone solved this?
>>>
>>> regards,
>>> Gorm Braarvig
>>
 >> Stay informed about: Good checksum component, anyone? 
Back to top
Login to vote
Gorm Braarvig

External


Since: Dec 20, 2008
Posts: 3



(Msg. 5) Posted: Thu Dec 25, 2008 5:36 pm
Post subject: Re: Good checksum component, anyone? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Greetings,

thanks for the swift reply and the links, but I am not closer to a solution,

what konesans check sum component does is: you can put a component in your
data flow and map up columns, etc. and get out a nice checksum you can add
to you data, later you compare the checksum to your previous checksum to
evaluate if any of the fields you care about has changed. Good idea.

however...

- the component, while having the right interface has an algorithm that
gives
the same checksum to different data, because it (if I guess correctly) uses
crc-32.

- md5 is overkill for my use, so I don't want to store a binary field or two
bigint's.
I want to use an algorithm that gives me a 64-bit checksum and I thought
using md5 and then combining it to half the size was a nice strategy (no???)

- If I was to implement this myself, (which I am capable of, but can't do,
since the structure of the projects and politics keeps me away from it), I
would simply use .NET crypto routines in a custom component. If this was
infeasable, I would attempt to use Microsoft Base Cryptographic Provider,
which I have had exposure
to in a previous gig...

my task is unsolved: a delta detection mechanism that works "good enough"
(2^32 is not, 2^64 is) while not taking up unnecessary space.

I wonder: has anyone else solved this in the data flow (in an easy way
without using a script component)?

thanks,
Gorm


"Russell Fields" wrote in message

> Gorm,
>
> Sorry, I don't know what to say. It strikes me as odd to feel it
> necessary to use MD5, then to XOR the first 8 bytes on the second 8 bytes.
> I would think that that certainly has to do something negative to the
> hash.
>
> Maybe one of these will be useful to you. Google: MD5 Component
>
> http://xstandard.com/en/documentation/xmd5/
> http://www.download.com/MD5-Com-Component/3000-2383_4-10449255.html
> http://www.traction-software.co.uk/devmd5/index.html
>
> RLF
>
> "Gorm Braarvig" wrote in message
>
>> Hi Russel!
>>
>> Can't use it, need to do it in the flow. I was thinking of merging the 16
>> bytes into 8 by xoring the two Int64 together, would be sufficient for
>> most (all?) applications.
>>
>> Thanks,
>> Gorm
>>
>> "Russell Fields" wrote in message
>> news:#7P7HCIZJHA.5312@TK2MSFTNGP02.phx.gbl...
>>> Gorm,
>>>
>>> Starting with SQL Server 2005 there is a HASHBYTES keyword that allows
>>> you to choose from a set of methods and returns VARBINARY. It can be
>>> cast into BIGINT, but it is not reversable.
>>>
>>> The MD5 method returns 16 bytes, but BIGINT is only 8 bytes.
>>>
>>> See the output of the following:
>>>
>>> SELECT HASHBYTES('MD5','Gorm Braarvig') AS BINMD5,
>>> CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT) AS BIGINTMD5,
>>> CAST (CAST (HASHBYTES('MD5','Gorm Braarvig') AS BIGINT)
>>> AS VARBINARY(8000)) AS BINAGAINMDF
>>>
>>> Results:
>>> 0x647679B1F3F515655EC3B478951307CF 6828499890013931471
>>> 0x5EC3B478951307CF
>>>
>>> Does that help?
>>>
>>> RLF
>>>
>>> "Gorm Braarvig" wrote in message
>>>
>>>> Hi!
>>>>
>>>> I currently use conesans checksum component, but I need a md5-checksum
>>>> pushed into a bigint (I believe conesans uses crc-32).
>>>> Has anyone solved this?
>>>>
>>>> regards,
>>>> Gorm Braarvig
>>>
>
 >> Stay informed about: Good checksum component, anyone? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Why I can not run Script Component debug in SSIS - Hi, I am not sure what I am missing as far as the configuration but I can not debug my SSIS package. I cna ste the breakpoints but the they are never hit. I also donot see "Edit Breakpoint" when I am in the data flow view. Can anybody tell me w...

writing to sequence container scoped variable from script .. - hi - i'm trying to populate a sequence level variable from a script inside a data flow. I am able to 1) reference the 'variableDispenser' object... 2) create a pointer to the variables collection with the statement.. 3) lock my variable... 4) but don't....

Good Book on DTS & ActiveX programming - Does anyone know of a good book on DTS and ActiveX programming? I have the following books, Professional SQL Server 2000 Programming by Robert Vieira - Wrox Press SQL Server 2000 DTS Step-By-Step by Carl Rabeler - MS Press VB Script Step-by-Step by Ed..

DTS workflow failure - I create a package to call other packages in one workflow ,it's very similar as below: Steps----on success--->step2----on success---->step3 - -----on failure--->step4...

csv to multiple tables - I have a CSV file like this: "fieldValue1","fieldValue2","fieldValue3","fieldValue4" I'd like to create a DTS package which dose the following operation on the CSV file: 1) Inserts "fieldValue1" into ...
   Database Help (Home) -> DTS All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]