Looked at the places in the code that uses MD5. I can see the places where a different hash algorithm can be specified. However, the handshake schemas use a MD5 fixed field with a length of 16. Different hashing algorithms will yield different hash lengths, e.g., 20 bytes for SHA-1 (vs 16 bytes for MD5). This can certainly be changed but I do see 16 assumed elsewhere in the code (along with unit tests). Changing the handshake schemas will break compatibility with other implementations. Any suggestions on minimizing compatibility impact?
Marylou -----Original Message----- From: Orayani, Marylou Sent: Friday, October 25, 2013 6:18 PM To: [email protected] Subject: RE: SHA support On that note, is there a configuration framework we can leverage so we can just specify the hash to use there? Marylou -----Original Message----- From: Orayani, Marylou Sent: Friday, October 25, 2013 4:04 PM To: [email protected] Subject: RE: SHA support That's what I figured after looking at the code. We'll take a stab at it and see how far we get. Thanks, Marylou -----Original Message----- From: Doug Cutting [mailto:[email protected]] Sent: Friday, October 25, 2013 3:47 PM To: [email protected] Subject: Re: SHA support On Thu, Oct 24, 2013 at 11:48 AM, Orayani, Marylou <[email protected]> wrote: > As I'm new to avro, how do I go about changing the handshake hash to SHA? This is not a user-configurable option. One would need to find the places in the RPC code where MD5 is used and replace it with SHA, or, better yet, with code that uses a configuration to determine which hashing algorithm to use. If you need this feature then you should probably file an issue in Jira. If you're not a developer yourself, hopefully you can find someone to implement it. https://cwiki.apache.org/confluence/display/AVRO/How+To+Contribute Cheers, Doug
