Lines Matching refs:cipher
43 zx_status_t GetCipher(Cipher::Algorithm cipher, const EVP_CIPHER** out) { in GetCipher() argument
44 switch (cipher) { in GetCipher()
54 xprintf("invalid cipher = %u\n", cipher); in GetCipher()
70 const EVP_CIPHER* cipher; in GetKeyLen() local
71 if ((rc = GetCipher(algo, &cipher)) != ZX_OK) { in GetKeyLen()
74 *out = cipher->key_len; in GetKeyLen()
86 const EVP_CIPHER* cipher; in GetIVLen() local
87 if ((rc = GetCipher(algo, &cipher)) != ZX_OK) { in GetIVLen()
90 *out = cipher->iv_len; in GetIVLen()
102 const EVP_CIPHER* cipher; in GetBlockSize() local
103 if ((rc = GetCipher(algo, &cipher)) != ZX_OK) { in GetBlockSize()
106 *out = cipher->block_size; in GetBlockSize()
122 const EVP_CIPHER* cipher; in Init() local
123 if ((rc = GetCipher(algo, &cipher)) != ZX_OK) { in Init()
126 if (key.len() != cipher->key_len || iv.len() != cipher->iv_len) { in Init()
134 size_t n = fbl::round_up(cipher->iv_len, sizeof(zx_off_t)) / sizeof(zx_off_t); in Init()
167 if (EVP_CipherInit_ex(&ctx_->impl, cipher, nullptr, key.get(), iv8, direction == kEncrypt) < in Init()
173 block_size_ = cipher->block_size; in Init()