| 155 | |
| 156 | |
| 157 | int test_openSSL_des() |
| 158 | { |
| 159 | /* test des encrypt/decrypt */ |
| 160 | char data[] = "this is my data "; |
| 161 | int dataSz = (int)strlen(data); |
| 162 | DES_key_schedule key[3]; |
| 163 | byte iv[8]; |
| 164 | EVP_BytesToKey(EVP_des_ede3_cbc(), EVP_md5(), NULL, (byte*)data, dataSz, 1, |
| 165 | (byte*)key, iv); |
| 166 | |
| 167 | byte cipher[16]; |
| 168 | DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, &key[0], &key[1], |
| 169 | &key[2], &iv, true); |
| 170 | byte plain[16]; |
| 171 | DES_ede3_cbc_encrypt(cipher, plain, 16, &key[0], &key[1], &key[2], |
| 172 | &iv, false); |
| 173 | return 0; |
| 174 | } |
nothing calls this directly
no test coverage detected