internal DefaultHttpMessageCryptoServiceWrapper(ITimestampProvider<string> timestampProvider)
        {
            var symmetricAlgorithm = new AES("secretKeyPassword", "initialVectorPassword");
            var hashAlgorithm = new HMACSHA512("hashKeyString");

            this.inner = new DefaultHttpMessageCryptoService(symmetricAlgorithm, hashAlgorithm, timestampProvider);
        }
Exemplo n.º 2
0
        public ServerCryptoHandler(string secretKeyPassword, string initialVectorPassword, string hashKeyString)
        {
            var symmetricAlgorithm = new AES(secretKeyPassword, initialVectorPassword);
            var hashAlgorithm = new HMACSHA512(hashKeyString);
            var timestampProvider = new DefaultTimestampProvider(TimeSpan.FromMinutes(15)) as ITimestampProvider<string>;

            this.messageCryptoService = new DefaultHttpMessageCryptoService(symmetricAlgorithm, hashAlgorithm, timestampProvider);
        }