swift: access sha of object using public attribute