def key_create_v1(self, request): data = _request_data(request, mandatory_keys=['alias', ]) return api.key_create( key_alias=data['alias'], key_size=int(data.get('size', 2048)), include_private=bool(data.get('include_private', '0') in ['1', 'true', ]), )
def jsonrpc_key_create(self, key_alias, key_size=4096): return api.key_create(key_alias, key_size)