Does anybody know any free implementation of either order preserving encryption or order preserving hashing? I've found some codes like CMPH but I need to dynamically add new DATA and that's why most of them doesn't apply.
This question appears to be off-topic. The users who voted to close gave this specific reason:
CryptDB implements order-preserving encryption, and its source code is publicly available. In fact, rather than building your own system that uses order-preserving encryption, you might try just using CryptDB.
Alternatively, in a pinch, I suppose you could take one of the papers that describes an order-preserving encryption algorithm and implement it yourself.