gcm_encryption_result.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_GCM_DRIVER_CRYPTO_GCM_ENCRYPTION_RESULT_H_
  5. #define COMPONENTS_GCM_DRIVER_CRYPTO_GCM_ENCRYPTION_RESULT_H_
  6. namespace gcm {
  7. // Result of encrypting an outgoing message. The values of these reasons must
  8. // not be changed as they are being recorded using UMA. When adding a value,
  9. // please update GCMEncryptionResult in //tools/metrics/histograms/enums.xml.
  10. enum class GCMEncryptionResult {
  11. // The message had been successfully be encrypted. The encryption scheme used
  12. // for the message was draft-ietf-webpush-encryption-08.
  13. ENCRYPTED_DRAFT_08 = 0,
  14. // No public/private key-pair was associated with the app_id.
  15. NO_KEYS = 1,
  16. // The shared secret cannot be derived from the keying material.
  17. INVALID_SHARED_SECRET = 2,
  18. // The payload could not be encrypted as AES-128-GCM.
  19. ENCRYPTION_FAILED = 3,
  20. // Should be one more than the otherwise highest value in this enumeration.
  21. ENUM_SIZE = ENCRYPTION_FAILED + 1
  22. };
  23. } // namespace gcm
  24. #endif // COMPONENTS_GCM_DRIVER_CRYPTO_GCM_ENCRYPTION_RESULT_H_