Yodlee: Unable to convert image codes into captcha in getMFAResponseForSite(Captcha type) - C#

梦想的初衷 提交于 2019-12-12 02:49:35

问题


After adding MFA enabled (captcha type MFA) site accounts through "addSiteAccounts1" API, i have got the response of image codes, which we want to convert into captcha image. I have checked with many scripts to convert but no result. Is there any simple steps to get the image(in C#). Following is the MFA response,

{
   "isMessageAvailable":true,
   "fieldInfo":{
      "responseFieldType":"text",
      "imageFieldType":"image",
      "image":[
         66,
         77,
         58,
         116,
         0,
         0,
         0,
         0,
         0,
         0,
         54,
         0,
         0,
         0,
         40,
         0,
         0,
         0,
         -91,
         0,
         0,
         0,
         45,
         0,
         0,
         0,
         1,
         0,
         32,
         0,
         0,
         0,
         0,
         0,
         4,
         116,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -5,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -9,
         -9,
         -9,
         0,
         -1,
         -5,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -5,
         -1,
         0,
         -17,
         -17,
         -17,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -9,
         -13,
         -9,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -9,
         -9,
         -9,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -17,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0
      ],
      "minimumLength":-1,
      "maximumLength":-1,
      "displayString":"Please enter the text shown in the image"
   },
   "timeOutTime":99900,
   "itemId":10014925,
   "retry":false
}

Thanks in advance..


回答1:


Here you are getting image in byte array which is present as String Array in response. You need to convert this byte array into image. There is few lines of code which will help you.

public Image byteArrayToImage(byte[] byteArrayIn)
{
     MemoryStream ms = new MemoryStream(byteArrayIn);
     Image returnImage = Image.FromStream(ms);
     return returnImage;
}

Additionally, here is the link which will help you.



来源:https://stackoverflow.com/questions/24532804/yodlee-unable-to-convert-image-codes-into-captcha-in-getmfaresponseforsitecapt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!