public CASTRequestParams(AppProvisioningInfo provInfo, ICryptographer cryptographer)
        {            
            provInfo.ValidateRequired("provInfo");
            cryptographer.ValidateRequired("cryptographer");
            //
            // To create a session, we prove our possesion of the app shared secret
            // We do this by creating an HMAC of some HmacContent
            //
            HmacContent content = new HmacContent(provInfo.AppIdInstance, cryptographer.HmacAlgorithm);
            string xmlContent = content.ToXml();
            Hmac hmac = cryptographer.Hmac(provInfo.SharedSecret, xmlContent);

            this.AppIDInstance = provInfo.AppIdInstance;
            this.Credential = new CASTCredential(hmac, content);
        }
        public CASTRequestParams(AppProvisioningInfo provInfo, ICryptographer cryptographer)
        {
            provInfo.ValidateRequired("provInfo");
            cryptographer.ValidateRequired("cryptographer");
            //
            // To create a session, we prove our possesion of the app shared secret
            // We do this by creating an HMAC of some HmacContent
            //
            HmacContent content    = new HmacContent(provInfo.AppIdInstance, cryptographer.HmacAlgorithm);
            string      xmlContent = content.ToXml();
            Hmac        hmac       = cryptographer.Hmac(provInfo.SharedSecret, xmlContent);

            this.AppIDInstance = provInfo.AppIdInstance;
            this.Credential    = new CASTCredential(hmac, content);
        }
예제 #3
0
 public HmacCredential(Hmac hmac, HmacContent content)
 {
     this.Hmac        = hmac;
     this.HmacContent = content;
     this.Validate();
 }
 public CASTCredential(Hmac hmac, HmacContent content)
 {
     this.Hmac = new HmacCredential(hmac, content);
 }
 public HmacCredential(Hmac hmac, HmacContent content)
 {
     this.Hmac = hmac;
     this.HmacContent  = content;
     this.Validate();
 }