public PeerHashToken(X509Certificate2 certificate, string password) { this.id = SecurityUniqueId.Create().Value; this.effectiveTime = DateTime.UtcNow; this.expirationTime = DateTime.UtcNow.AddHours(10.0); this.authenticator = PeerSecurityHelpers.ComputeHash(certificate, password); this.CheckValidity(); }
public byte[] GetAuthenticator() { if (authenticationMode != PeerAuthenticationMode.Password) { return(null); } if (authenticatorHash == null) { lock (ThisLock) { if (authenticatorHash == null) { authenticatorHash = PeerSecurityHelpers.ComputeHash(credManager.Certificate, credManager.Password); } } } return(authenticatorHash); }
public PeerHashToken(Claim claim, string password) { this.authenticator = PeerSecurityHelpers.ComputeHash(claim, password); CheckValidity(); }
public PeerHashToken(X509Certificate2 certificate, string password) { this.authenticator = PeerSecurityHelpers.ComputeHash(certificate, password); CheckValidity(); }