网站如何加密API响应?

时间:2018-03-10 16:43:18

标签: api encryption hex

当我们在Google Chrome网络标签中看到某些大型网站的API响应时,我们会看到来自服务器的加密响应。响应只不过是十六进制代码。我的问题是他们如何加密和解密响应?

这是来自API

的响应的一部分
UklGRrYOAABXRUJQVlA4IKoOAABQTQCdASqMADgBPp1InEspJiOipZSsmSATiWdu9njBhAXvkAGEwM0pVp0Vtl+58T/Mx8VmXEyed/+t8R/lfqI+0/81wJoAPrTxQ/Y/2APL//g+Md6b7Bf549GPRxqK9MU8br74eUUtjw4pZONiJSAHoqEDWJs/nd5K6QyFWVHS3Lc8tpSc9hcUujRcmgAOpchLjBmazvgKNZYYaSukJNO9zR5CCT2zI10PYzrFPdzmrkh8qhtLJsz52la882SxY7exKCx89+yWAJTiwWftlLow1Y3h5AVGkjsSPiwwwssoLLOIqket5okV/R/CWDUznoKXaZ0uZmy7t2LZse/m12417SlDTtL2atjbXDU+IL4X8lAiBYN7x/RHYvCLCOXSmwxeb37DShuLvjpaqCKrfasHOb5XIUt4pxo9Z26+dP55H5hr/gUbIwcFoIqujIBoBpyQt7pSn+K1vk0pLFlsFh0UNc+sDP6C3nkuL9NSHyD0bSDc9xaTdUy+Vi4QbEYl+8o/zmlMwly/0DfgBlSt5qox99q2/YIA/HlTon1g1axafSTH3wyeFCsPsptOALJt/gMjBU6Fd1mTQTj0mTaTusJxzmIw2cPA09zu+C0t7j3E+WHYiOSyJiCST2+d7CjkXuw1vt4z9GlKSUA5eugQihpkPeKA4i8AosBuDgKfa0pEtyfSfrjQWqAIg4T/biemsUnVYv2rz0a5iPCQWapQ5HBI9UWedGBWxDPe8eMwLyPuvRNpUc2RcLgXn+dV7IIn/TcIA6L0hnyuuNM8+0ZT1IebwMDRiNqo5Fm7nSyLCRIl/2XmKIvuLIKSjo7CKCp4/K1LCYAA/vsNQ3v/Q9l8z161kYqlMqRPPkxneDOIGEZRA3bPnNzB8jb2DzOi97b7kG5bO61pd4czbNB3W8PA3/uCUVys5gfaSHquJ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/HkupsEbpwN56YgULvw7g890W7d2fam0dWUKjeeyvwBfVtwmCjwjfMpXMKywFXjAxNyHmvwaQzcpLWKmAvVTsMf/+cW9qRDX/d5eMkILpdMkYBhLbqMx/HoPA5UY6vdHVGvYWwmO4ncUfIu6yv0pFPSZq8imvjORHTGZcmQnJ5q12/AAYy1bOsX0eB/pnp6fchRSKM0af7AHZw5Ls1n0OG3KchLtBipvykjAB/J/uQk8bFsLJBX2euegMp7DQ2LqVTRou88BPTsX9H336oZD6BusD0tTRWPa3fNvMMnfLok6QHa1dzLHv5vj/Co+x/rbWE2KUXfXYdpX0w6mjeDq8NnWU9h6vqcqCuUlsm7JLaWXUeZRkubGiVBmMyJLhl86myH6SivhHtByE8H8ERX0/132SlFoiAi6Vla66mAQYufVEQztD2bHfy99HClTX95nvbib2vfvwN5RJ+XlZYvWABibHp2Dj7c14PtXovcwuU+y7GE5BztmemmMUvQBx/5xXUOHffcBr+S1NFtO11naN8BGZgUtWOliJ+Aac/Ezd0QfNLzDr+gE+Zi610oBvEXlfZkWNiV05ssU0+rph6zkge64zjmMnaFyYOhN41DdULOuqROw06wMToTIRajwtC5c1aOjNEQq9BR1of7OBVY4ELSp87vneEFjdubXKdzK1PfmrNE2q4kDEsZo4PBAPYeEfNSlS7S4F+1XAoN1awW0QgH+MbMjvFXODCq5KoG9xuUiO4MSqMDuIhhoYLbuJfUnSeJRtGgln0irdHSVM5HmD19oSN0vy1iyKJEToTH4K2zDA6LkgwAOd/0Hf

1 个答案:

答案 0 :(得分:2)

未加密,也不是hex。这只是Base64 encoded。这是一张RIFF图片:

$ echo "..." | base64 -D > x
$ file x
RIFF (little-endian) data, Web/P image, VP8 encoding, 140x312, Scaling: [none]x[none], YUV color, decoders should clamp
但是,它似乎是透明的。使用Chrome打开它。