login about faq

I'm using the following code to compute a hashcode for a set of strings in Objective-C:

    [crypt HashBeginString: array[0]];
    for (int i = 1; i < array.count; i++)
        [crypt HashMoreString: array[i]];
    NSString *hashcode = [crypt HashFinalENC];

Working fine.

I'm also trying to compute the same hashcode for comparison in Python, using the following code:

    for i in range(1, len(array)):
    hashcode = crypt.HashFinalENC()

...which raises an error:

    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/chilkat.py", line 2553, in HashFinalENC
    def HashFinalENC(self, *args): return _chilkat.CkCrypt2_HashFinalENC(self, *args)
    TypeError: CkCrypt2_HashFinalENC() takes exactly 2 arguments (1 given)

Two arguments? I know that the object is implicitly passed as the the first argument, but why is it asking for a second one?

This seems inconsistent with both the ObjC version and the Python documentation for this function. I can't find any Python sample to indicate what I should be providing, and Python not being my language of choice, I can't figure out it wants.

Any suggestions?

asked Jun 14 '13 at 19:58

sfsdfd's gravatar image


edited Jun 15 '13 at 09:21

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 14 '13 at 19:58

Seen: 854 times

Last updated: Jun 15 '13 at 09:21

powered by OSQA