xray icon indicating copy to clipboard operation
xray copied to clipboard

关于加密函数-‘rsaEncryptPKCS1v15’未声明的引用报错

Open SurnIce opened this issue 1 year ago • 2 comments

将password,publickey定义在set中,并定义encrypted_password: rsaEncryptPKCS1v15(password, publicKey) set: password: randomLowercase(8) md5_password: md5(password) publicKey: string("-----BEGIN RSA PUBLIC KEY-----\nMr1mDO1/qDiJ\ngRcF+9/VKi/5hmqJ2jpL3BYGv9EEmwnwTSRoKizWNJD++sLR4ae7HRPrFCf1LbiIeQIDAQAB\n-----END RSA PUBLIC KEY-----") encrypted_password: rsaEncryptPKCS1v15(password, publicKey) 报错如下 image ERROR: :1:25: undeclared reference to 'rsaEncryptPKCS1v15' (in container '') 将encrypted_password: rsaEncryptPKCS1v15(password, publicKey)写在output中也报错 将加密函数rsaEncryptPKCS1v15改为md5时正常

期望: 将规则获取到的publickey能对指定明文密码进行加密,后续其他包中需要用到此加密后的密码新建账号 能解决这里的报错ERROR: :1:25: undeclared reference to 'rsaEncryptPKCS1v15' (in container ''),应该如何书写

SurnIce avatar Dec 02 '24 08:12 SurnIce

new_password: base64(rsaEncryptPKCS1v15(bytes(password),pubkey)))

试下

4ra1n avatar Dec 26 '24 03:12 4ra1n

另外 rsaEncryptPKCS1v15 函数我不确定 1.9.11 的 xray 是否支持

4ra1n avatar Dec 26 '24 03:12 4ra1n