ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs
/// <summary>
///     Encrypts data with ASF encryption mechanisms using provided details.
/// </summary>
Encrypts data with ASF encryption mechanisms using provided details.
Encrypts data with ASF encryption mechanisms using provided details .
[Consumes("application/json")]
	[HttpPost("Hash")]
	[ProducesResponseType(typeof(GenericResponse<string>), (int) HttpStatusCode.OK)]
	[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)]
	public ActionResult<GenericResponse> ASFHashPost([FromBody] ASFHashRequest request) {
		ArgumentNullException.ThrowIfNull(request);
		if (string.IsNullOrEmpty(request.StringToHash)) {
			return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(request.StringToHash))));
		}
		string hash = Actions.Hash(request.HashingMethod, request.StringToHash);
		return Ok(new GenericResponse<string>(hash));
	}
[ Consumes ( " " ) ] [ HttpPost ( " " ) ] [ ProducesResponseType ( typeof ( GenericResponse < string > ) , ( int ) HttpStatusCode . OK ) ] [ ProducesResponseType ( typeof ( GenericResponse ) , ( int ) HttpStatusCode . BadRequest ) ] public ActionResult < GenericResponse > ASFHashPost ( [ FromBody ] ASFHashRequest request ) { ArgumentNullException . ThrowIfNull ( request ) ; if ( string . IsNullOrEmpty ( request . StringToHash ) ) { return BadRequest ( new GenericResponse ( false , string . Format ( CultureInfo . CurrentCulture , Strings . ErrorIsEmpty , nameof ( request . StringToHash ) ) ) ) ; } string hash = Actions . Hash ( request . HashingMethod , request . StringToHash ) ; return Ok ( new GenericResponse < string > ( hash ) ) ; }
Encrypts data with ASF encryption mechanisms using provided details.
Encrypts data with ASF encryption mechanisms using provided details .
ASFHashRequest
[FromBody]