public void EncryptTest()
        {
            var authContext = new AuthContext
            {
                DeviceInfo = Data.Metadata,
                Terminal   = Data.PublicTerminal
            };
            var personalInfo = Data.PersonalInfo;
            var sessionKey   = Data.SessionKey;

            // Test 1: Validate null argument.
            Assert.Throws <ArgumentNullException>("key", () => authContext.Encrypt(personalInfo, null));
            Assert.Throws <ArgumentNullException>("data", () => authContext.Encrypt(null, sessionKey));

            // Test 2: All fields are set after call.
            authContext.Encrypt(personalInfo, sessionKey);
            Assert.NotNull(authContext.AadhaarNumber);
            Assert.NotNull(authContext.Data);
            Assert.NotNull(authContext.DeviceInfo);
            Assert.NotNull(authContext.Hmac);
            Assert.NotNull(authContext.KeyInfo);
            Assert.Equal(personalInfo.Timestamp, authContext.Timestamp);

            // Test 3: DeviceInfo device value are set to NA.
            personalInfo.Biometrics.Clear();
            authContext.Encrypt(personalInfo, sessionKey);
            Assert.Equal(Metadata.DeviceNotApplicable, authContext.DeviceInfo.FingerprintDeviceCode);
            Assert.Equal(Metadata.DeviceNotApplicable, authContext.DeviceInfo.IrisDeviceCode);
        }