コード例 #1
0
 /// <summary>
 /// See <see cref="Authenticator"/>.
 /// </summary>
 /// <returns>The instance of the builder.</returns>
 public RtmClientBuilder SetRoleSecretAuthenticator(string role, string secret)
 {
     Authenticator = con =>
     {
         return(AuthRoleSecret.Authenticate(con, role, secret));
     };
     return(this);
 }
コード例 #2
0
        public void GenerateHash()
        {
            var hash = AuthRoleSecret.ComputeHash("B37Ab888CAB4343434bAE98AAAAAABC1", "nonce");

            Assert.That(hash, Is.EqualTo("B510MG+AsMpvUDlm7oFsRg=="));
        }