// Token: 0x0600516C RID: 20844 RVA: 0x0012D480 File Offset: 0x0012B680 internal static IEnumerable <AlternateServiceAccountCredential> LoadFromRegistry(RegistryKey rootKey, bool decryptPasswords) { if (decryptPasswords) { AlternateServiceAccountConfiguration.EnsureCanDoCryptoOperations(); } return(from valueName in rootKey.GetValueNames() select AlternateServiceAccountCredential.LoadFromRegistry(rootKey, valueName, decryptPasswords) into credential where credential != null select credential); }
// Token: 0x0600516B RID: 20843 RVA: 0x0012D408 File Offset: 0x0012B608 internal static AlternateServiceAccountCredential Create(TimeSpan randomizationTimeStampDelta, PSCredential credential) { if (credential == null) { throw new ArgumentNullException("credential"); } AlternateServiceAccountConfiguration.EnsureCanDoCryptoOperations(); string domain; string userName; AlternateServiceAccountCredential.ParseQualifiedUserName(credential.UserName, out domain, out userName); DateTime whenAddedUtc = DateTime.UtcNow + randomizationTimeStampDelta; return(new AlternateServiceAccountCredential(AlternateServiceAccountCredential.GetRegistryValueName(whenAddedUtc), null, true, whenAddedUtc, domain, userName, credential.Password)); }