Ejemplo n.º 1
0
        /// <exception cref="System.IO.IOException"/>
        private void SetupConnectionsWithRetry(MapHost host, ICollection <TaskAttemptID> remaining
                                               , Uri url)
        {
            OpenConnectionWithRetry(host, remaining, url);
            if (stopped)
            {
                return;
            }
            // generate hash of the url
            string msgToEncode = SecureShuffleUtils.BuildMsgFrom(url);
            string encHash     = SecureShuffleUtils.HashFromString(msgToEncode, shuffleSecretKey);

            SetupShuffleConnection(encHash);
            Connect(connection, connectionTimeout);
            // verify that the thread wasn't stopped during calls to connect
            if (stopped)
            {
                return;
            }
            VerifyConnection(url, msgToEncode, encHash);
        }
Ejemplo n.º 2
0
        /// <exception cref="System.IO.IOException"/>
        public static string CreateDigest(byte[] password, string data)
        {
            SecretKey key = JobTokenSecretManager.CreateSecretKey(password);

            return(SecureShuffleUtils.HashFromString(data, key));
        }
Ejemplo n.º 3
0
        /// <exception cref="System.IO.IOException"/>
        protected internal virtual string CreateDigest(byte[] password, string data)
        {
            SecretKey key = JobTokenSecretManager.CreateSecretKey(password);

            return(SecureShuffleUtils.HashFromString(data, key));
        }