diff options
Diffstat (limited to 'xpcom/io/Base64.h')
-rw-r--r-- | xpcom/io/Base64.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xpcom/io/Base64.h b/xpcom/io/Base64.h index cc8ea07981..aa175eea3a 100644 --- a/xpcom/io/Base64.h +++ b/xpcom/io/Base64.h @@ -12,30 +12,30 @@ class nsIInputStream; namespace mozilla { -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64EncodeInputStream(nsIInputStream* aInputStream, nsACString& aDest, uint32_t aCount, uint32_t aOffset = 0); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64EncodeInputStream(nsIInputStream* aInputStream, nsAString& aDest, uint32_t aCount, uint32_t aOffset = 0); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64Encode(const char* aBinary, uint32_t aBinaryLen, char** aBase64); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64Encode(const nsACString& aBinary, nsACString& aBase64); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64Encode(const nsAString& aBinary, nsAString& aBase64); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64Decode(const char* aBase64, uint32_t aBase64Len, char** aBinary, uint32_t* aBinaryLen); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64Decode(const nsACString& aBase64, nsACString& aBinary); -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64Decode(const nsAString& aBase64, nsAString& aBinary); enum class Base64URLEncodePaddingPolicy { @@ -48,7 +48,7 @@ enum class Base64URLEncodePaddingPolicy { * Aims to encode the data in constant time. The caller retains ownership * of |aBinary|. */ -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64URLEncode(uint32_t aBinaryLen, const uint8_t* aBinary, Base64URLEncodePaddingPolicy aPaddingPolicy, nsACString& aBase64); @@ -62,7 +62,7 @@ enum class Base64URLDecodePaddingPolicy { /** * Decodes a Base64 URL-encoded |aBase64| into |aBinary|. */ -MOZ_MUST_USE nsresult +[[nodiscard]] nsresult Base64URLDecode(const nsACString& aBase64, Base64URLDecodePaddingPolicy aPaddingPolicy, FallibleTArray<uint8_t>& aBinary); |