rclone-js
rclone-js copied to clipboard
Error: PKCS#7 padding byte out of range
Hi, I'm trying to use this in a project of mine and I'm seeing this error at a point where my program tries to decrypt a filename. Here are the details:
version of rclone-js used: v1.4.0
password = "Xh7Fo052KYB7ypGaeGemn_g-ohdsnx5Iy_Nx" (taken directly from rclone.conf)
filename to be decrypted = "k228l0jkifs6gj6odqs1d8blbs"
Password strength in bits = 64 (Although, it gave the same error with 128 and 256 bits as well, if that's helpful)
Stacktrace:
Error: PKCS#7 padding byte out of range
at Object.pkcs7strip [as strip] (.\node_modules\aes-js\index.js:730:34)
at decryptName (.\node_modules\rclone\dist\ciphers\PathCipher.js:65:29)
at Array.map (<anonymous>)
at Object.decrypt (.\node_modules\rclone\dist\ciphers\PathCipher.js:69:28)
at .\test.js:12:17
Am I correct in assuming the password is the obscured version from the rclone.conf file? Or does it need to be the plain unobscured version?
You are correct in using the obscured version. If you are using a custom salt, you need to pass that one too.