Post
Topic
Board Announcements (Altcoins)
Re: [ANN] [SKC] Skeincoin | Skein-SHA2 | CPU mining initially | RELEASED
by
ziegengert
on 12/12/2013, 20:01:54 UTC
So I tried the approach by reorder, but I still stuck with embedding the skeinmidhash-function in python:
 I found all the flakes needed for the lib that includes the skeinmidhash-function, I could compile the lib and I can access the function via python.
But I have no glue how to the access the output of the skeinhashmid function in python, like it has been defined in former posts by reorder.


So my question to you reorder is:

Can you give me/us please some more hinds how to embed your functions into python using your ctypes wrapper.

I think it would be very helpful for this coin to have a working  and easier accessible gpu implementation, because this would lift the interest for a broader spectrum of people.

I am not sure what kind of glue do you mean, perhaps this piece?
Code:
import ctypes

_shlib = ctypes.CDLL('../skeinhash/skeinhash.so')

def skeinhashmid(msg):
    msgb = ctypes.create_string_buffer(msg[:64])
    hashb = ctypes.create_string_buffer(64)
    _shlib.skeinhashmid(hashb, msgb, 64)
    return hashb.raw

def skeinhash(msg):
    msgb = ctypes.create_string_buffer(msg)
    hashb = ctypes.create_string_buffer(32)
    _shlib.skeinhash(hashb, msgb, len(msg))
    return hashb.raw

Besides, if anyone has skill and time to clean up and release the miner, please PM, I will give it away. Things to clean up are: update licensing/copyright texts, remove dead code, reimplement ntime-rolling (currently disabled), replace skeinhash with pure python implementation.

Yes, that's exactly what I was searching for, Thanks! ... A new piece in the puzzle Smiley ...