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("Encrypt")]
	[ProducesResponseType(typeof(GenericResponse<string>), (int) HttpStatusCode.OK)]
	[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)]
	public ActionResult<GenericResponse> ASFEncryptPost([FromBody] ASFEncryptRequest request) {
		ArgumentNullException.ThrowIfNull(request);
		if (string.IsNullOrEmpty(request.StringToEncrypt)) {
			return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(request.StringToEncrypt))));
		}
		string? encryptedString = Actions.Encrypt(request.CryptoMethod, request.StringToEncrypt);
		return Ok(new GenericResponse<string>(encryptedString));
	}
[ Consumes ( " " ) ] [ HttpPost ( " " ) ] [ ProducesResponseType ( typeof ( GenericResponse < string > ) , ( int ) HttpStatusCode . OK ) ] [ ProducesResponseType ( typeof ( GenericResponse ) , ( int ) HttpStatusCode . BadRequest ) ] public ActionResult < GenericResponse > ASFEncryptPost ( [ FromBody ] ASFEncryptRequest request ) { ArgumentNullException . ThrowIfNull ( request ) ; if ( string . IsNullOrEmpty ( request . StringToEncrypt ) ) { return BadRequest ( new GenericResponse ( false , string . Format ( CultureInfo . CurrentCulture , Strings . ErrorIsEmpty , nameof ( request . StringToEncrypt ) ) ) ) ; } string ? encryptedString = Actions . Encrypt ( request . CryptoMethod , request . StringToEncrypt ) ; return Ok ( new GenericResponse < string > ( encryptedString ) ) ; }
Encrypts data with ASF encryption mechanisms using provided details.
Encrypts data with ASF encryption mechanisms using provided details .
ASFEncryptRequest
[FromBody]