| // Copyright 2023 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Our Python generator removes the "_serialized_" namespace when generating |
| // the code, to avoid symbol clash with the code generated by flatc. |
| namespace cryptohome._serialized_; |
| |
| // Define serializable versions of enumerations that correspond to standard ones |
| // used in cryptohome protobufs and C++ code. |
| // |
| // Note that the underlying integer values of the enum constants should NOT be |
| // assumed to match the underlying vales of the corresponding C++ or protobuf |
| // values. In other words, do not try to convert between the different enum |
| // types by directly casting integer values. |
| |
| // Serialized representation of AuthFactorType enum. |
| enum SerializedAuthFactorType : int { |
| kPassword = 1, |
| kPin = 2, |
| kCryptohomeRecovery = 3, |
| kKiosk = 4, |
| kSmartCard = 5, |
| kLegacyFingerprint = 6, |
| kFingerprint = 7, |
| } |
| |
| // Serialized representation of AuthIntent enum. |
| enum SerializedAuthIntent : int { |
| kDecrypt = 1, |
| kVerifyOnly = 2, |
| kWebAuthn = 3, |
| kRestoreKey = 4, |
| kForensics = 5 |
| } |