コード例 #1
0
 /// <summary>
 /// Create a new QR code identification with pin.
 /// </summary>
 /// <param name="EVCOId">An QR code identification.</param>
 /// <param name="PIN">A optional pin.</param>
 public QRCodeIdentification(EVCO_Id EVCOId,
                             String PIN = null)
 {
     this.EVCOId   = EVCOId;
     this.PIN      = PIN?.Trim() ?? "";
     this.Function = PINCrypto.None;
     this.Salt     = "";
 }
コード例 #2
0
 /// <summary>
 /// Create a new QR code identification with a hashed pin.
 /// </summary>
 /// <param name="EVCOId">An QR code identification.</param>
 /// <param name="HashedPIN">A hashed pin.</param>
 /// <param name="Function">A crypto function.</param>
 /// <param name="Salt">A salt of the crypto function.</param>
 public QRCodeIdentification(EVCO_Id EVCOId,
                             String HashedPIN,
                             PINCrypto Function,
                             String Salt = "")
 {
     this.EVCOId   = EVCOId;
     this.PIN      = HashedPIN?.Trim() ?? "";
     this.Function = Function;
     this.Salt     = Salt ?? "";
 }
コード例 #3
0
        /// <summary>
        /// Create a new identification.
        /// </summary>
        /// <param name="EVCOId">An QR code identification.</param>
        /// <param name="HashedPIN">A hashed pin.</param>
        /// <param name="Function">A crypto function.</param>
        /// <param name="Salt">A salt of the crypto function.</param>
        /// <param name="CustomData">Optional custom data.</param>
        public static Identification FromQRCodeIdentification(EVCO_Id EVCOId,
                                                              String HashedPIN,
                                                              PINCrypto Function,
                                                              String Salt = "",
                                                              IReadOnlyDictionary <String, Object> CustomData = null)

        => new Identification(QRCodeIdentification:  new QRCodeIdentification(EVCOId,
                                                                              HashedPIN,
                                                                              Function,
                                                                              Salt),
                              CustomData:            CustomData);