MCPcopy Create free account
hub / github.com/ceph/ceph / init

Method init

src/client/FSCrypt.cc:299–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299int FSCryptKey::init(const char *k, int klen) {
300 int r = fscrypt_calc_hkdf(HKDF_CONTEXT_KEY_IDENTIFIER,
301 nullptr, 0, /* nonce */
302 nullptr, 0, /* salt */
303 (const char *)k, klen,
304 identifier.raw, sizeof(identifier.raw));
305 if (r < 0) {
306 return r;
307 }
308
309 key.append_hole(klen);
310 memcpy(key.c_str(), k, klen);
311
312 return 0;
313}
314
315int FSCryptKey::calc_hkdf(char ctx_identifier,
316 const char *nonce, int nonce_len,

Callers 2

createMethod · 0.45
invalidateMethod · 0.45

Calls 4

fscrypt_calc_hkdfFunction · 0.85
initFunction · 0.50
append_holeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected