diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 49db1f9f04..76d2b1e79f 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -179,6 +179,11 @@ String URL::toString (const bool includeGetParameters) const return url; } +bool URL::isEmpty() const noexcept +{ + return url.isEmpty(); +} + bool URL::isWellFormed() const { //xxx TODO diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index 4f511d870b..06d8fb732d 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -76,6 +76,9 @@ public: */ String toString (bool includeGetParameters) const; + /** Returns true if the URL is an empty string. */ + bool isEmpty() const noexcept; + /** True if it seems to be valid. */ bool isWellFormed() const; diff --git a/modules/juce_cryptography/encryption/juce_RSAKey.cpp b/modules/juce_cryptography/encryption/juce_RSAKey.cpp index fdc588e97a..2c1e9d8154 100644 --- a/modules/juce_cryptography/encryption/juce_RSAKey.cpp +++ b/modules/juce_cryptography/encryption/juce_RSAKey.cpp @@ -54,6 +54,11 @@ bool RSAKey::operator!= (const RSAKey& other) const noexcept return ! operator== (other); } +bool RSAKey::isValid() const noexcept +{ + return operator!= (RSAKey()); +} + String RSAKey::toString() const { return part1.toString (16) + "," + part2.toString (16); diff --git a/modules/juce_cryptography/encryption/juce_RSAKey.h b/modules/juce_cryptography/encryption/juce_RSAKey.h index 19ec1f39ea..8df7eeca54 100644 --- a/modules/juce_cryptography/encryption/juce_RSAKey.h +++ b/modules/juce_cryptography/encryption/juce_RSAKey.h @@ -113,11 +113,15 @@ public: //============================================================================== /** Turns the key into a string representation. - This can be reloaded using the constructor that takes a string. */ String toString() const; + /** Returns true if the object is a valid key, or false if it was created by + the default constructor. + */ + bool isValid() const noexcept; + //============================================================================== /** Encodes or decodes a value.