卖家 api /reports/2020-09-04/documents/amzn1.tortuga.3.18666cbf-dfdf-dsfsd-bf4b-sdfdsfsdfsdf.TBWRJF481G44N
回复
{“有效负载”:{“reportDocumentId”:“amzn1.tortuga.3.18666cbf-dfdf-dsfsd-bf4b-sdfdsfsdfsdf.TBWRJF481G44N”,“encryptionDetails”:{“标准”:“AES”,“initializationVector”:“nG2rSrj1Ra9e03IStEBkdg== ", "key": "9CT0qwtzUHLXlFTh0aLxk4qSQYAJ7texG8KDIZ0JSy8=" }, "url": "https://tortuga-prod-eu.s3-eu-west-1.amazonaws.com/%2FNinetyDays/amzn1.tortuga.3.18666cbf-e671 -asds-sdfs-dsfdsfdsfds.sdvfdsdssdfsd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201208T192515Z&X-Amz-SignedHeaders=主机&X-Amz-Expires=300&X-Amz-Credential=dsdf2%Feu-west201dsf8 -1%2Fs3%2Faws4_request&X-Amz-Signature=45hjkkjkjdfdsfsd4545jkkjhkj4554j" } }
解密nodejs代码
const crypto = 要求('crypto');
常量算法 = 'AES';
常量键='9CT0qwtzUHLXlFTh0aLxk4qSQYAJ7texG8KDIZ0JSy8=';常量 iv = 'nG2rSrj1Ra9e03IStEBkdg==';
const decipher = crypto.createDecipheriv(算法,密钥,iv);
错误 - IV 长度无效