Jmeter-无法生成令牌

时间:2018-12-14 04:44:01

标签: jmeter beanshell

能帮我吗?

我想在Jmeter上创建令牌跟随算法:

哈希:= sha256.Sum256([] byte(orderKey + apiKey))     返回hex.EncodeToString(hash [:32])

非常感谢您!

1 个答案:

答案 0 :(得分:0)

使用__digest函数,第一个参数SHA-256和第二个参数字符串进行编码

${__digest(SHA-256,Felix qui potuit rerum cognoscere causas,mysalt,,)}
     

返回a3bc6900fe2b2fc5fa8a601a4a84e27a079bf2c581d485009bc5c00516729ac7