MaXUN Posted March 2, 2021 Posted March 2, 2021 Hi everyone, im creating a acp for l2scripts server Currently i havig problems to encrypt the password, i try with the common base64_encode(pack("H*",sha1($password))), but is not working (The stored password has 88 char lenght instead 28) Any one working with this source know how is the password encryption?
0 BruT Posted March 6, 2021 Posted March 6, 2021 (edited) The base64 encoded string of the 64 bytes is 88 character long. try base32 instead. Edited March 6, 2021 by BruT
0 Kara Posted March 5, 2021 Posted March 5, 2021 On 3/2/2021 at 5:48 PM, MaXUN said: Hi everyone, im creating a acp for l2scripts server Currently i havig problems to encrypt the password, i try with the common base64_encode(pack("H*",sha1($password))), but is not working (The stored password has 88 char lenght instead 28) Any one working with this source know how is the password encryption? Do you have access to the source? If yes you can check the encryption style though java. If not you can write here. I have access in all Scripts sources i can paste you the part where it encrypt/decrypt the password.
0 MaXUN Posted March 6, 2021 Author Posted March 6, 2021 On 3/4/2021 at 9:34 PM, Kara said: Do you have access to the source? If yes you can check the encryption style though java. If not you can write here. I have access in all Scripts sources i can paste you the part where it encrypt/decrypt the password. public String encrypt(String password) throws Exception { AbstractChecksum checksum = JacksumAPI.getChecksumInstance(name); checksum.setEncoding("BASE64"); checksum.update(password.getBytes()); return checksum.format("#CHECKSUM"); } @Kara i mean they are using the jacksumAPI but i cannot use that on NodeJS
0 Kara Posted March 6, 2021 Posted March 6, 2021 15 minutes ago, MaXUN said: public String encrypt(String password) throws Exception { AbstractChecksum checksum = JacksumAPI.getChecksumInstance(name); checksum.setEncoding("BASE64"); checksum.update(password.getBytes()); return checksum.format("#CHECKSUM"); } @Kara i mean they are using the jacksumAPI but i cannot use that on NodeJS I'm not familiar with JS but if you say so. If it's your problem or your client's project why don't you simply change the encoding to something similar to L2J ?
Question
MaXUN
Hi everyone, im creating a acp for l2scripts server
Currently i havig problems to encrypt the password, i try with the common base64_encode(pack("H*",sha1($password))), but is not working
(The stored password has 88 char lenght instead 28)
Any one working with this source know how is the password encryption?
4 answers to this question
Recommended Posts