public DerivedKeySecurityToken CreateToken(SecurityToken tokenToDerive, int maxKeyLength) { DerivedKeySecurityToken result = new DerivedKeySecurityToken(this.generation, this.offset, this.length, this.label, this.nonce, tokenToDerive, this.tokenToDeriveIdentifier, this.derivationAlgorithm, this.Id); result.InitializeDerivedKey(maxKeyLength); return result; }
public DerivedKeySecurityToken CreateToken(SecurityToken tokenToDerive, int maxKeyLength) { DerivedKeySecurityToken token = new DerivedKeySecurityToken(this.generation, this.offset, this.length, this.label, this.nonce, tokenToDerive, this.tokenToDeriveIdentifier, this.derivationAlgorithm, this.Id); token.InitializeDerivedKey(maxKeyLength); return(token); }
public DerivedKeySecurityToken CreateToken(SecurityToken tokenToDerive, int maxKeyLength) { DerivedKeySecurityToken result = new DerivedKeySecurityToken(_generation, _offset, _length, _label, _nonce, tokenToDerive, TokenToDeriveIdentifier, _derivationAlgorithm, Id); result.InitializeDerivedKey(maxKeyLength); return(result); }
private DerivedKeySecurityToken GetCachedToken(string id, int generation, int offset, int length, string label, byte[] nonce, SecurityToken tokenToDerive, SecurityKeyIdentifierClause tokenToDeriveIdentifier, string derivationAlgorithm) { for (int i = 0; i < this.cachedTokens.Length; i++) { DerivedKeySecurityTokenCache cachedToken = this.cachedTokens[i]; if ((cachedToken != null) && this.IsMatch(cachedToken, id, generation, offset, length, label, nonce, tokenToDerive, derivationAlgorithm)) { DerivedKeySecurityToken token = new DerivedKeySecurityToken(generation, offset, length, label, nonce, tokenToDerive, tokenToDeriveIdentifier, derivationAlgorithm, id); token.InitializeDerivedKey(cachedToken.SecurityKeys); return token; } } return null; }