Lines Matching refs:inAlgo
977 int XfrmController::fillNlAttrXfrmAlgoEnc(const XfrmAlgo& inAlgo, nlattr_algo_crypt* algo) { in fillNlAttrXfrmAlgoEnc() argument
978 if (inAlgo.name.empty()) { // Do not fill anything if algorithm not provided in fillNlAttrXfrmAlgoEnc()
984 strncpy(algo->crypt.alg_name, inAlgo.name.c_str(), sizeof(algo->crypt.alg_name)); in fillNlAttrXfrmAlgoEnc()
985 algo->crypt.alg_key_len = inAlgo.key.size() * 8; // bits in fillNlAttrXfrmAlgoEnc()
986 memcpy(algo->key, &inAlgo.key[0], inAlgo.key.size()); in fillNlAttrXfrmAlgoEnc()
987 len += inAlgo.key.size(); in fillNlAttrXfrmAlgoEnc()
992 int XfrmController::fillNlAttrXfrmAlgoAuth(const XfrmAlgo& inAlgo, nlattr_algo_auth* algo) { in fillNlAttrXfrmAlgoAuth() argument
993 if (inAlgo.name.empty()) { // Do not fill anything if algorithm not provided in fillNlAttrXfrmAlgoAuth()
999 strncpy(algo->auth.alg_name, inAlgo.name.c_str(), sizeof(algo->auth.alg_name)); in fillNlAttrXfrmAlgoAuth()
1000 algo->auth.alg_key_len = inAlgo.key.size() * 8; // bits in fillNlAttrXfrmAlgoAuth()
1003 algo->auth.alg_trunc_len = inAlgo.truncLenBits; in fillNlAttrXfrmAlgoAuth()
1005 memcpy(algo->key, &inAlgo.key[0], inAlgo.key.size()); in fillNlAttrXfrmAlgoAuth()
1006 len += inAlgo.key.size(); in fillNlAttrXfrmAlgoAuth()
1012 int XfrmController::fillNlAttrXfrmAlgoAead(const XfrmAlgo& inAlgo, nlattr_algo_aead* algo) { in fillNlAttrXfrmAlgoAead() argument
1013 if (inAlgo.name.empty()) { // Do not fill anything if algorithm not provided in fillNlAttrXfrmAlgoAead()
1019 strncpy(algo->aead.alg_name, inAlgo.name.c_str(), sizeof(algo->aead.alg_name)); in fillNlAttrXfrmAlgoAead()
1020 algo->aead.alg_key_len = inAlgo.key.size() * 8; // bits in fillNlAttrXfrmAlgoAead()
1024 algo->aead.alg_icv_len = inAlgo.truncLenBits; in fillNlAttrXfrmAlgoAead()
1026 memcpy(algo->key, &inAlgo.key[0], inAlgo.key.size()); in fillNlAttrXfrmAlgoAead()
1027 len += inAlgo.key.size(); in fillNlAttrXfrmAlgoAead()