MCPcopy Create free account
hub / github.com/AGWA/git-crypt / store

Method store

key.cpp:129–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void Key_file::Entry::store (std::ostream& out) const
130{
131 // Version
132 write_be32(out, KEY_FIELD_VERSION);
133 write_be32(out, 4);
134 write_be32(out, version);
135
136 // AES key
137 write_be32(out, KEY_FIELD_AES_KEY);
138 write_be32(out, AES_KEY_LEN);
139 out.write(reinterpret_cast<const char*>(aes_key), AES_KEY_LEN);
140
141 // HMAC key
142 write_be32(out, KEY_FIELD_HMAC_KEY);
143 write_be32(out, HMAC_KEY_LEN);
144 out.write(reinterpret_cast<const char*>(hmac_key), HMAC_KEY_LEN);
145
146 // End
147 write_be32(out, KEY_FIELD_END);
148}
149
150void Key_file::Entry::generate (uint32_t arg_version)
151{

Callers 3

export_keyFunction · 0.80
keygenFunction · 0.80
migrate_keyFunction · 0.80

Calls 1

write_be32Function · 0.85

Tested by

no test coverage detected