Ejemplo n.º 1
0
 public WrappedKeySecurityToken(string id, byte[] keyToWrap, string wrappingAlgorithm, ISspiNegotiation wrappingSspiContext, byte[] wrappedKey)
     : this(id, keyToWrap, wrappingAlgorithm, (XmlDictionaryString)null)
 {
     if (wrappingSspiContext == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("wrappingSspiContext");
     }
     this.wrappingSspiContext     = wrappingSspiContext;
     this.wrappedKey              = wrappedKey != null ? wrappedKey : wrappingSspiContext.Encrypt(keyToWrap);
     this.serializeCarriedKeyName = false;
 }
Ejemplo n.º 2
0
 // direct receiver use, chained sender use
 internal WrappedKeySecurityToken(string id, byte[] keyToWrap, string wrappingAlgorithm, ISspiNegotiation wrappingSspiContext, byte[] wrappedKey)
     : this(id, keyToWrap, wrappingAlgorithm, null)
 {
     if (wrappingSspiContext == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("wrappingSspiContext");
     }
     _wrappingSspiContext = wrappingSspiContext;
     if (wrappedKey == null)
     {
         _wrappedKey = wrappingSspiContext.Encrypt(keyToWrap);
     }
     else
     {
         _wrappedKey = wrappedKey;
     }
     _serializeCarriedKeyName = false;
 }