def sign_v1_message(body, platform, version, epoch=None):
 token = get_secret_token(platform, version, global_version=1)
 epoch = int((epoch or current_epoch()))
 payload = epoch_wrap(epoch, body)
 signature = versioned_hmac(token, payload, global_version=1)
 return '{global_version}:{platform}:{version}:{epoch}:{signature}'.format(global_version=1, platform=platform, version=version, epoch=epoch, signature=signature)

def sign_v1_message ( body , platform , version , epoch = None ) : token = get_secret_token ( platform , version , global_version = 1 ) epoch = int ( ( epoch or current_epoch ( ) ) ) payload = epoch_wrap ( epoch , body ) signature = versioned_hmac ( token , payload , global_version = 1 ) return '{global_version}:{platform}:{version}:{epoch}:{signature}' . format ( global_version = 1 , platform = platform , version = version , epoch = epoch , signature = signature )
reference implementation of the v1 mobile body signing .