MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_iv_len

Function get_iv_len

dpdk/lib/vhost/vhost_crypto.c:161–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161static int get_iv_len(enum rte_crypto_cipher_algorithm algo)
162{
163 int len;
164
165 switch (algo) {
166 case RTE_CRYPTO_CIPHER_3DES_CBC:
167 len = 8;
168 break;
169 case RTE_CRYPTO_CIPHER_3DES_CTR:
170 len = 8;
171 break;
172 case RTE_CRYPTO_CIPHER_3DES_ECB:
173 len = 8;
174 break;
175 case RTE_CRYPTO_CIPHER_AES_CBC:
176 len = 16;
177 break;
178
179 /* TODO: add common algos */
180
181 default:
182 len = -1;
183 break;
184 }
185
186 return len;
187}
188
189/**
190 * vhost_crypto struct is used to maintain a number of virtio_cryptos and

Callers 2

transform_cipher_paramFunction · 0.85
transform_chain_paramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected