MCPcopy Create free account
hub / github.com/apache/impala / GetKeyLenForMode

Function GetKeyLenForMode

be/src/util/openssl-util.cc:398–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398int GetKeyLenForMode(AES_CIPHER_MODE m) {
399 switch (m) {
400 case AES_CIPHER_MODE::AES_128_ECB:
401 case AES_CIPHER_MODE::AES_128_GCM:
402 return 16;
403 case AES_CIPHER_MODE::AES_256_ECB:
404 case AES_CIPHER_MODE::AES_256_GCM:
405 case AES_CIPHER_MODE::AES_256_CTR:
406 case AES_CIPHER_MODE::AES_256_CFB:
407 return 32;
408 default:
409 return -1;
410 }
411}
412
413Status ValidateModeAndKeyLength(AES_CIPHER_MODE m, int key_len) {
414 if (m == AES_CIPHER_MODE::INVALID) {

Callers 2

ValidateModeAndKeyLengthFunction · 0.85
InitializeRandomMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected