Browse Source

Added RSAKey::isValid() and URL::isEmpty()

tags/2021-05-28
jules 10 years ago
parent
commit
eed0a41a4f
4 changed files with 18 additions and 1 deletions
  1. +5
    -0
      modules/juce_core/network/juce_URL.cpp
  2. +3
    -0
      modules/juce_core/network/juce_URL.h
  3. +5
    -0
      modules/juce_cryptography/encryption/juce_RSAKey.cpp
  4. +5
    -1
      modules/juce_cryptography/encryption/juce_RSAKey.h

+ 5
- 0
modules/juce_core/network/juce_URL.cpp View File

@@ -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


+ 3
- 0
modules/juce_core/network/juce_URL.h View File

@@ -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;


+ 5
- 0
modules/juce_cryptography/encryption/juce_RSAKey.cpp View File

@@ -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);


+ 5
- 1
modules/juce_cryptography/encryption/juce_RSAKey.h View File

@@ -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.


Loading…
Cancel
Save