using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EVCB_OCPP.Packet.Messages.SubTypes
{
   public class CertificateHashDataType
    {
        /// <summary>
        /// Used algorithms for the hashes provided.
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public HashAlgorithmEnumType hashAlgorithm { set; get; }

        /// <summary>
        /// hashed value of the IssuerName.
        /// </summary>
        [Required]
        [StringLength(128,MinimumLength =0)]
        public string issuerNameHash { set; get; }

        /// <summary>
        /// hashed value of the issuers public key
        /// </summary>
        [Required]
        [StringLength(128, MinimumLength = 0)]
        public string issuerKeyHash { set; get; }

        /// <summary>
        /// hashed value of The serial number of the certificate.
        /// </summary>
        [Required]
        [StringLength(40, MinimumLength = 0)]
        public string serialNumber { set; get; }
    }
}
