NelsonFMP Posted August 26, 2010 Posted August 26, 2010 I've been using scriptmaster plug-in for a while now with the auto update feature installed on my FileMaker Server. I'm using the MD5 hash module within scriptmaster for an electronic signatures filemaker solution I developed. Works great with the Filemaker client on desktops, downloads the plug-in on the client machine and registers the scriptmaster libraries perfect. The problem is we want to move to using iPads to access the Filemaker solution and obviously the plug-in doesn't work with the iPad. We need to the plug-in and scriptmaster in order to generate the hash for signatures. Without it the solution is worthless. Is there any work around for this? Is the plug-in required on the client in order to register the functions? The MD5 hash is hashing a significant amount of data so other hash functions I've found will not work because they limit the amount of data you can hash. Scriptmaster does not. Help
bcooney Posted August 26, 2010 Posted August 26, 2010 Can you queue requests and have the FMS process the request?
NelsonFMP Posted August 26, 2010 Author Posted August 26, 2010 the hash has to be done at the time of create the record, which is a service note that staff applies their electronic signature to. Not sure what you mean by queue requests. Staff access the FM solution realtime.
bcooney Posted August 26, 2010 Posted August 26, 2010 With the lack of plugin support, off-loading plugin functionality to the Server is a recommended approach. If there's any way to do that...
NelsonFMP Posted August 26, 2010 Author Posted August 26, 2010 That's exactly what I'm trying to find out. If there is a MD5 hash or sha-1 hash that doesn't require a plugin that can handle large amounts of text to be hashed.
bcooney Posted August 26, 2010 Posted August 26, 2010 No, that's not what I meant. I meant is there a way to have server (w/Scriptmaster) perform the function.
Vaughan Posted August 26, 2010 Posted August 26, 2010 There is a FM custom-function version of MD5 around the 'net I think at Brian Dunning's web site. Be sure to check that it returns exactly the same result for the same input.
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 Brian's site has a fnv1a hash function, but I'm looking for 128 bit cryptographic hash like MD5 and SHA. I really need a filemaker function that creates an MD5 or SHA hash string.
bcooney Posted August 27, 2010 Posted August 27, 2010 http://www.unwwwired.net/projects/md5 ..and since I'm way over my head, I'll stay out of this now.
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 yeah, I found the unwired MD5 hash site by Brent Faulkner too. Unfortunately, his hash function only allows limited data, like 100 characters. I need much more than that.
Vaughan Posted August 27, 2010 Posted August 27, 2010 Yes, I wrote that function. In doing that I spent some time researching hash functions. The important thing with Hash functions is the collision rate - the number of times different inputs will create the same hash. All hash functions suffer from this by the very nature that they have a fixed-length output. So a 32 bit binary hash can only create 2^32 different outputs. The other consideration is (I forget the correct term) the difference in output that a small change in input makes. It's relatively easy to create hash functions of any length by changing the internal calculations. However this affects the calculation speed and the ability for the hash function to work well with small text inputs. The comments for the hash function on DB's site contains a link to the original source of the calculation. It explains how to change the hash length so you can make a 128 bit hash if you want. Note that some of the values in the hash calculation are rather arbitrarily selected and there is a lot of "I tried this value and it seems to work ok" going on.
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 I am looking for the MD5 hash, the reading I was doing separated out hash functions based on cryptographic (http://en.wikipedia.org/wiki/Cryptographic_hash_function) Wow, you wrote it, nice job. I actually started to use that, but ran into an issue because the function was limited on the amount of text it could hash. If there's a way to increase that my problem will be solved. Right now it can only fit (asdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddaaa)
Vaughan Posted August 27, 2010 Posted August 27, 2010 From memory, there should be no limit to the text input (other than limits in the calculation engine in FMP). What result is the function returning?
Vaughan Posted August 27, 2010 Posted August 27, 2010 I just did a quick test and it appears to be working. This is with an updated version of the function that I just posted but it should not have an affect on the result. HashFNV1a32 ( "asdfgdddddddddddddddddddddddasdfgdddddddddddddddd dddddddasdfgdddddddddddddddddddddddasdfgdddddddddd dddddddddddddasdfgdddddddddddddddddddddddasdfgdddd dddddddddddddddddddasdfgdddddddddddddddddddddddasd fgdddddddddddddddddddddddasdfgdddddddddddddddddddd dddasdfgdddddddddddddddddddddddasdfgdddddddddddddd dddddddddaaa" ) = 00111110011100011001110000101111 HashFNV1a32 ( "more asdfgdddddddddddddddddddddddasdfgdddddddddddddddd dddddddasdfgdddddddddddddddddddddddasdfgdddddddddd dddddddddddddasdfgdddddddddddddddddddddddasdfgdddd dddddddddddddddddddasdfgdddddddddddddddddddddddasd fgdddddddddddddddddddddddasdfgdddddddddddddddddddd dddasdfgdddddddddddddddddddddddasdfgdddddddddddddd dddddddddaaa" ) = 00000000100001000000000011001101 HashFNV1a32 ( "even more asdfgdddddddddddddddddddddddasdfgdddddddddddddddd dddddddasdfgdddddddddddddddddddddddasdfgdddddddddd dddddddddddddasdfgdddddddddddddddddddddddasdfgdddd dddddddddddddddddddasdfgdddddddddddddddddddddddasd fgdddddddddddddddddddddddasdfgdddddddddddddddddddd dddasdfgdddddddddddddddddddddddasdfgdddddddddddddd dddddddddaaa" ) = 01111100100000000111011100100111
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 There's definitly a limit on how much text it will hash. the field being hashed contains the following: asdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddaaa and produces the following hash 900150983cd24fb0d6963f7d28e17f72 If I add a character: asdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddasdfgdddddddddddddddddddddddaaaZ I get this: ? The MD5 plug-in I'm using from 360 works and scriptmaster doesn't have a limit and seems to work fine. Am I making sense?
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 I'm sorry, we were talking about two different functions. I was talking about the one on this site:http://www.unwwwired.net/projects/md5 You were talking about the FNV1a function, sorry. I really need to step it up to MD5 128 bit
Vaughan Posted August 27, 2010 Posted August 27, 2010 Just to clarify: I wrote the cfs for the FNV hash and the Adler that are on Brian Dunnings web site. I did not do the MD5. IIRC the Adler is simple but not good for short strings, which is what I needed it for.
Vaughan Posted August 27, 2010 Posted August 27, 2010 Yeah sorry for the confusion. Is there a reason the FNV won't do? I mean, are people likely to crack it, or is collision resistance the main concern?
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 I think our tech advisers wanted to see 128 bit hash and because it was available in MD5 we started using it. Like I said, we're using it now, but just need it out of the plug-in and into a function.
Vaughan Posted August 27, 2010 Posted August 27, 2010 The FNV cf I posted can be modified to 128 bit.
NelsonFMP Posted August 27, 2010 Author Posted August 27, 2010 Thanks so much for the back and forth. I'll give it a try.
Recommended Posts
This topic is 5201 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now