コード例 #1
0
        public void Decrypting_the_signatureString_returns_the_correct_state()
        {
            expectedState = new SignatureState("aKey", "aPassword", expiry);

            signatureState = signatureProvider.Parse(encryptedSignature);

            Assert.AreEqual(expectedState.Key, signatureState.Key);
            Assert.AreEqual(expectedState.Password, signatureState.Password);
            Assert.AreEqual(expectedState.ExpiryDate, signatureState.ExpiryDate);
        }
コード例 #2
0
ファイル: SignatureProvider.cs プロジェクト: LloydDreghorn/VE
        private SignatureState BuildState(string rawSignature)
        {

            var stateValues = rawSignature.Split(',');
            var ticks = Int64.Parse(stateValues[2]);

            var key = stateValues[0];
            var password = stateValues[1];
            var expiry = new DateTime(ticks);

            var state = new SignatureState(key, password, expiry);
            return state;

        }
コード例 #3
0
 protected override void When()
 {
     signatureState = signatureProvider.Parse(testSignatureString);
 }