public void ParseEncryptionKey() { var response = new Fetcher.LoginResponse(Salt, DerivationRulesJson, EncryptedKey); var key = Fetcher.ParseEncryptionKey(response, Password); Assert.AreEqual(Key, key); }
public void ParseEncryptionKey_throws_on_short_salt() { var response = new Fetcher.LoginResponse("too short", DerivationRulesJson, EncryptedKey); var e = Assert.Throws <FetchException>(() => Fetcher.ParseEncryptionKey(response, Password)); Assert.AreEqual(FetchException.FailureReason.LegacyUser, e.Reason); Assert.AreEqual("Legacy user is not supported", e.Message); }