| @@ -5379,9 +5379,10 @@ void RSAKey::createKeyPair (RSAKey& publicKey, RSAKey& privateKey, | |||||
| const int numBits, const int* randomSeeds, const int numRandomSeeds) | const int numBits, const int* randomSeeds, const int numRandomSeeds) | ||||
| { | { | ||||
| jassert (numBits > 16); // not much point using less than this.. | jassert (numBits > 16); // not much point using less than this.. | ||||
| jassert (numRandomSeeds == 0 || numRandomSeeds >= 2); // you need to provide plenty of seeds here! | |||||
| BigInteger p (Primes::createProbablePrime (numBits / 2, 30, randomSeeds, numRandomSeeds)); | |||||
| BigInteger q (Primes::createProbablePrime (numBits - numBits / 2, 30, randomSeeds, numRandomSeeds)); | |||||
| BigInteger p (Primes::createProbablePrime (numBits / 2, 30, randomSeeds, numRandomSeeds / 2)); | |||||
| BigInteger q (Primes::createProbablePrime (numBits - numBits / 2, 30, randomSeeds == 0 ? 0 : (randomSeeds + numRandomSeeds / 2), numRandomSeeds - numRandomSeeds / 2)); | |||||
| const BigInteger n (p * q); | const BigInteger n (p * q); | ||||
| const BigInteger m (--p * --q); | const BigInteger m (--p * --q); | ||||
| @@ -15031,7 +15031,8 @@ public: | |||||
| The randomSeeds parameter lets you optionally pass it a set of values with | The randomSeeds parameter lets you optionally pass it a set of values with | ||||
| which to seed the random number generation, improving the security of the | which to seed the random number generation, improving the security of the | ||||
| keys generated. | |||||
| keys generated. If you supply these, make sure you provide more than 2 values, | |||||
| and the more your provide, the better the security. | |||||
| */ | */ | ||||
| static void createKeyPair (RSAKey& publicKey, | static void createKeyPair (RSAKey& publicKey, | ||||
| RSAKey& privateKey, | RSAKey& privateKey, | ||||
| @@ -36886,38 +36887,53 @@ public: | |||||
| /** | /** | ||||
| This structure holds a set of properties describing the current audio setup. | This structure holds a set of properties describing the current audio setup. | ||||
| @see AudioDeviceManager::setAudioDeviceSetup() | |||||
| An AudioDeviceManager uses this class to save/load its current settings, and to | |||||
| specify your preferred options when opening a device. | |||||
| @see AudioDeviceManager::setAudioDeviceSetup(), AudioDeviceManager::initialise() | |||||
| */ | */ | ||||
| struct JUCE_API AudioDeviceSetup | struct JUCE_API AudioDeviceSetup | ||||
| { | { | ||||
| /** Creates an AudioDeviceSetup object. | |||||
| The default constructor sets all the member variables to indicate default values. | |||||
| You can then fill-in any values you want to before passing the object to | |||||
| AudioDeviceManager::initialise(). | |||||
| */ | |||||
| AudioDeviceSetup(); | AudioDeviceSetup(); | ||||
| bool operator== (const AudioDeviceSetup& other) const; | bool operator== (const AudioDeviceSetup& other) const; | ||||
| /** The name of the audio device used for output. | /** The name of the audio device used for output. | ||||
| The name has to be one of the ones listed by the AudioDeviceManager's currently | The name has to be one of the ones listed by the AudioDeviceManager's currently | ||||
| selected device type. | selected device type. | ||||
| This may be the same as the input device. | This may be the same as the input device. | ||||
| An empty string indicates the default device. | |||||
| */ | */ | ||||
| String outputDeviceName; | String outputDeviceName; | ||||
| /** The name of the audio device used for input. | /** The name of the audio device used for input. | ||||
| This may be the same as the output device. | This may be the same as the output device. | ||||
| An empty string indicates the default device. | |||||
| */ | */ | ||||
| String inputDeviceName; | String inputDeviceName; | ||||
| /** The current sample rate. | /** The current sample rate. | ||||
| This rate is used for both the input and output devices. | This rate is used for both the input and output devices. | ||||
| A value of 0 indicates the default rate. | |||||
| */ | */ | ||||
| double sampleRate; | double sampleRate; | ||||
| /** The buffer size, in samples. | /** The buffer size, in samples. | ||||
| This buffer size is used for both the input and output devices. | This buffer size is used for both the input and output devices. | ||||
| A value of 0 indicates the default buffer size. | |||||
| */ | */ | ||||
| int bufferSize; | int bufferSize; | ||||
| /** The set of active input channels. | /** The set of active input channels. | ||||
| The bits that are set in this array indicate the channels of the | The bits that are set in this array indicate the channels of the | ||||
| input device that are active. | input device that are active. | ||||
| If useDefaultInputChannels is true, this value is ignored. | |||||
| */ | */ | ||||
| BigInteger inputChannels; | BigInteger inputChannels; | ||||
| @@ -36930,6 +36946,7 @@ public: | |||||
| /** The set of active output channels. | /** The set of active output channels. | ||||
| The bits that are set in this array indicate the channels of the | The bits that are set in this array indicate the channels of the | ||||
| input device that are active. | input device that are active. | ||||
| If useDefaultOutputChannels is true, this value is ignored. | |||||
| */ | */ | ||||
| BigInteger outputChannels; | BigInteger outputChannels; | ||||
| @@ -91,38 +91,53 @@ public: | |||||
| /** | /** | ||||
| This structure holds a set of properties describing the current audio setup. | This structure holds a set of properties describing the current audio setup. | ||||
| @see AudioDeviceManager::setAudioDeviceSetup() | |||||
| An AudioDeviceManager uses this class to save/load its current settings, and to | |||||
| specify your preferred options when opening a device. | |||||
| @see AudioDeviceManager::setAudioDeviceSetup(), AudioDeviceManager::initialise() | |||||
| */ | */ | ||||
| struct JUCE_API AudioDeviceSetup | struct JUCE_API AudioDeviceSetup | ||||
| { | { | ||||
| /** Creates an AudioDeviceSetup object. | |||||
| The default constructor sets all the member variables to indicate default values. | |||||
| You can then fill-in any values you want to before passing the object to | |||||
| AudioDeviceManager::initialise(). | |||||
| */ | |||||
| AudioDeviceSetup(); | AudioDeviceSetup(); | ||||
| bool operator== (const AudioDeviceSetup& other) const; | bool operator== (const AudioDeviceSetup& other) const; | ||||
| /** The name of the audio device used for output. | /** The name of the audio device used for output. | ||||
| The name has to be one of the ones listed by the AudioDeviceManager's currently | The name has to be one of the ones listed by the AudioDeviceManager's currently | ||||
| selected device type. | selected device type. | ||||
| This may be the same as the input device. | This may be the same as the input device. | ||||
| An empty string indicates the default device. | |||||
| */ | */ | ||||
| String outputDeviceName; | String outputDeviceName; | ||||
| /** The name of the audio device used for input. | /** The name of the audio device used for input. | ||||
| This may be the same as the output device. | This may be the same as the output device. | ||||
| An empty string indicates the default device. | |||||
| */ | */ | ||||
| String inputDeviceName; | String inputDeviceName; | ||||
| /** The current sample rate. | /** The current sample rate. | ||||
| This rate is used for both the input and output devices. | This rate is used for both the input and output devices. | ||||
| A value of 0 indicates the default rate. | |||||
| */ | */ | ||||
| double sampleRate; | double sampleRate; | ||||
| /** The buffer size, in samples. | /** The buffer size, in samples. | ||||
| This buffer size is used for both the input and output devices. | This buffer size is used for both the input and output devices. | ||||
| A value of 0 indicates the default buffer size. | |||||
| */ | */ | ||||
| int bufferSize; | int bufferSize; | ||||
| /** The set of active input channels. | /** The set of active input channels. | ||||
| The bits that are set in this array indicate the channels of the | The bits that are set in this array indicate the channels of the | ||||
| input device that are active. | input device that are active. | ||||
| If useDefaultInputChannels is true, this value is ignored. | |||||
| */ | */ | ||||
| BigInteger inputChannels; | BigInteger inputChannels; | ||||
| @@ -135,6 +150,7 @@ public: | |||||
| /** The set of active output channels. | /** The set of active output channels. | ||||
| The bits that are set in this array indicate the channels of the | The bits that are set in this array indicate the channels of the | ||||
| input device that are active. | input device that are active. | ||||
| If useDefaultOutputChannels is true, this value is ignored. | |||||
| */ | */ | ||||
| BigInteger outputChannels; | BigInteger outputChannels; | ||||
| @@ -120,9 +120,10 @@ void RSAKey::createKeyPair (RSAKey& publicKey, RSAKey& privateKey, | |||||
| const int numBits, const int* randomSeeds, const int numRandomSeeds) | const int numBits, const int* randomSeeds, const int numRandomSeeds) | ||||
| { | { | ||||
| jassert (numBits > 16); // not much point using less than this.. | jassert (numBits > 16); // not much point using less than this.. | ||||
| jassert (numRandomSeeds == 0 || numRandomSeeds >= 2); // you need to provide plenty of seeds here! | |||||
| BigInteger p (Primes::createProbablePrime (numBits / 2, 30, randomSeeds, numRandomSeeds)); | |||||
| BigInteger q (Primes::createProbablePrime (numBits - numBits / 2, 30, randomSeeds, numRandomSeeds)); | |||||
| BigInteger p (Primes::createProbablePrime (numBits / 2, 30, randomSeeds, numRandomSeeds / 2)); | |||||
| BigInteger q (Primes::createProbablePrime (numBits - numBits / 2, 30, randomSeeds == 0 ? 0 : (randomSeeds + numRandomSeeds / 2), numRandomSeeds - numRandomSeeds / 2)); | |||||
| const BigInteger n (p * q); | const BigInteger n (p * q); | ||||
| const BigInteger m (--p * --q); | const BigInteger m (--p * --q); | ||||
| @@ -92,7 +92,8 @@ public: | |||||
| The randomSeeds parameter lets you optionally pass it a set of values with | The randomSeeds parameter lets you optionally pass it a set of values with | ||||
| which to seed the random number generation, improving the security of the | which to seed the random number generation, improving the security of the | ||||
| keys generated. | |||||
| keys generated. If you supply these, make sure you provide more than 2 values, | |||||
| and the more your provide, the better the security. | |||||
| */ | */ | ||||
| static void createKeyPair (RSAKey& publicKey, | static void createKeyPair (RSAKey& publicKey, | ||||
| RSAKey& privateKey, | RSAKey& privateKey, | ||||