ethan75

Results 4 comments of ethan75

openssl命令计算哈希: ![image](https://user-images.githubusercontent.com/16460760/128111605-1ae37d58-e5b8-4c14-a71b-239beee1ab0b.png) hello world的sm3哈希: 44f0061e69fa6fdfc290c494654a05dc0c053da7e5c52b84ef93a9d67d3fff88 交易1: ![image](https://user-images.githubusercontent.com/16460760/128111579-efaa9811-50a3-4f1a-ae62-7b5461dc3117.png) ![image](https://user-images.githubusercontent.com/16460760/128111598-31a8b74e-b102-452b-951b-2c3e554af08b.png) 返回值0xb7d9aad52768f37cc28f23bf2ab0c88961c86d7a4cacf4d23612bfc280a50950和命令生成的不一致。 交易2 16进制 :68656C6C6F20776F726C64 ![image](https://user-images.githubusercontent.com/16460760/128111618-1bb22f39-e939-4de9-b95b-8ecf2d80e423.png) ![image](https://user-images.githubusercontent.com/16460760/128111628-76355c91-1fe7-4390-8d11-8d11e8bb12a0.png) 哈希值正确0x44f0061e69fa6fdfc290c494654a05dc0c053da7e5c52b84ef93a9d67d3fff88

function sm3hash(bytes data) returns(bytes32 hash){ Crypto crypto = Crypto(0x5011); //return crypto.sm3(data); return crypto.sm3("hello world"); } 这样调用可以

![image](https://user-images.githubusercontent.com/16460760/168226398-179986dc-e088-45c4-b0b8-646fd1e8f2ed.png) **Using the environment:** docker occlum/occlum:0.23.0-ubuntu18.04 **steps:** root@84fcff104b87:~/ta/test-other/popen_test# occlum-gcc main.c -o main root@84fcff104b87:~/ta/test-other/popen_test# occlum-gcc test.c -o test root@84fcff104b87:~/ta/test-other/popen_test# cp main test occlum-instance/image/bin/ root@84fcff104b87:~/ta/test-other/popen_test# cd occlum-instance/ root@84fcff104b87:~/ta/test-other/popen_test/occlum-instance# occlum build Enclave sign-tool:...

Using the environment: docker.io/occlum/occlum:0.23.0-ubuntu18.04