A PHP implementation of the SM-2 algorithm