<p>A test for detecting the nonrandomness of finite binary strings is proposed. This test, based on an evaluation of the power spectrum of a finite string, extends and quantifies a similar test proposed by J. Gait. As an empirical measure of the sensitivity of the test, it was compared with a chi-square test for uniformity of distribution, which also measures nonrandomness. This comparison was performed by applying each of these tests to binary strings produced using short-round versions of the data encryption standard (DES) in output-feedback mode. By varying the number of DES rounds from 1 to 16, it was possible to gradually vary the degree of randomness of the resulting strings. The degree of randomness of the DES, including the 15 short-round versions, was also assessed. Only ensembles generated by one and two round versions were rejected as random.</p>