Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public ClientCryptoHandler(IHttpMessageCryptoService messageCryptoService)
        {
            if (messageCryptoService == null)
            {
                throw new ArgumentNullException("messageCryptoService");
            }

            this.messageCryptoService = messageCryptoService;
        }