Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1842)

Unified Diff: cryptohome_common.h

Issue 2645008: Update on feedback, update dbus API, add unit tests. TEST=manual,unit,BVT BUG=3628 323 (Closed) Base URL: ssh://git@chromiumos-git/cryptohome.git
Patch Set: Address second round of feedback. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cryptohome.xml ('k') | cryptohomed.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cryptohome_common.h
diff --git a/cryptohome_common.h b/cryptohome_common.h
index d6e0d37ab49007d3649492091bbab8b44f153e4d..2aff2b91476d36367fb0ca2487416619edea3f6e 100644
--- a/cryptohome_common.h
+++ b/cryptohome_common.h
@@ -2,25 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CRYPTOHOME_COMMON_H_
-#define CRYPTOHOME_COMMON_H_
-
-extern "C" {
-#include <ecryptfs.h>
-}
+#ifndef CRYPTOHOME_CRYPTOHOME_COMMON_H_
+#define CRYPTOHOME_CRYPTOHOME_COMMON_H_
namespace cryptohome {
// The default symmetric key size for cryptohome is the ecryptfs default
-#define CRYPTOHOME_DEFAULT_KEY_SIZE ECRYPTFS_MAX_KEY_BYTES
-#define CRYPTOHOME_DEFAULT_KEY_SIGNATURE_SIZE ECRYPTFS_SIG_SIZE
-#define CRYPTOHOME_DEFAULT_KEY_SALT_SIZE ECRYPTFS_SALT_SIZE
-#define CRYPTOHOME_AES_KEY_BYTES ECRYPTFS_AES_KEY_BYTES
+#define CRYPTOHOME_DEFAULT_KEY_SIZE 64 // ECRYPTFS_MAX_KEY_BYTES
+#define CRYPTOHOME_DEFAULT_KEY_SIGNATURE_SIZE 8 // ECRYPTFS_SIG_SIZE
+#define CRYPTOHOME_DEFAULT_KEY_SALT_SIZE 8 // ECRYPTFS_SALT_SIZE
+#define CRYPTOHOME_AES_KEY_BYTES 16 // ECRYPTFS_AES_KEY_BYTES
// The default salt length for the user salt
#define CRYPTOHOME_DEFAULT_SALT_LENGTH 16
-// Macros for min and max
-#define CRYPTOHOME_MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
-#define CRYPTOHOME_MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
+#define CRYPTOHOME_PWNAME_BUF_LENGTH 1024
struct VaultKeysetHeader {
char signature[2];
@@ -39,6 +33,6 @@ struct VaultKeysetKeys {
} __attribute__((__packed__));
typedef struct VaultKeysetKeys VaultKeysetKeys;
-} // cryptohome
+} // namespace cryptohome
-#endif // CRYPTOHOME_COMMON_H_
+#endif // CRYPTOHOME_CRYPTOHOME_COMMON_H_
« no previous file with comments | « cryptohome.xml ('k') | cryptohomed.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698