Added hasf for swift
Fixed Hash generation