public void SecretKeyProvider_NewSecret_LengthNegative1_ThrowArgumentOutOfRangeException() { int length = -1; SecretKeyProvider secrets = new SecretKeyProvider(); secrets.NewSecret(length); }
public ActionResult InitialSetup() { SecretKeyProvider secretKeyProvider = new SecretKeyProvider(); ViewBag.EncryptionKey = secretKeyProvider.NewSecretBase64(32); ViewBag.EmergencyAccessKey = secretKeyProvider.NewSecret(32); return(View()); }
public void SecretKeyProvider_NewSecret_Length64_ReturnKeyWith64Length() { int length = 64; SecretKeyProvider secrets = new SecretKeyProvider(); string secret = secrets.NewSecret(length); Assert.AreEqual(length, secret.Length); }