ct_sct_to_string.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2016 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 NET_CERT_CT_SCT_TO_STRING_H_
  5. #define NET_CERT_CT_SCT_TO_STRING_H_
  6. #include <string>
  7. #include "net/base/net_export.h"
  8. #include "net/cert/sct_status_flags.h"
  9. #include "net/cert/signed_certificate_timestamp.h"
  10. // Functions for converting non-string attributes of
  11. // net::ct::SignedCertificateTimestamp and net::ct::SCTVerifyStatus values to
  12. // strings.
  13. namespace net::ct {
  14. // Returns a textual representation of |hash_algorithm|.
  15. NET_EXPORT const std::string HashAlgorithmToString(
  16. DigitallySigned::HashAlgorithm hashAlgorithm);
  17. // Returns a textual representation of |origin|.
  18. NET_EXPORT const std::string OriginToString(
  19. SignedCertificateTimestamp::Origin origin);
  20. // Returns a textual representation of |signatureAlgorithm|.
  21. NET_EXPORT const std::string SignatureAlgorithmToString(
  22. DigitallySigned::SignatureAlgorithm signatureAlgorithm);
  23. // Returns a textual representation of |status|.
  24. NET_EXPORT const std::string StatusToString(SCTVerifyStatus status);
  25. } // namespace net::ct
  26. #endif // NET_CERT_CT_SCT_TO_STRING_H_