summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParagon Initiative Enterprises <security@paragonie.com>2016-07-11 16:32:06 -0400
committerParagon Initiative Enterprises <security@paragonie.com>2016-07-11 16:32:06 -0400
commite085e08c939de49707dbf64315d178d90fbc708d (patch)
tree9bc71495c4cb0c78ccf6482b2991a72587fa0e90
parent802a31079090bcfb8dfc88a5704bef3a761a39ec (diff)
downloadconstant_time_encoding-e085e08c939de49707dbf64315d178d90fbc708d.zip
constant_time_encoding-e085e08c939de49707dbf64315d178d90fbc708d.tar.gz
constant_time_encoding-e085e08c939de49707dbf64315d178d90fbc708d.tar.bz2
Return type consistencyv2.0.3
-rw-r--r--src/Base64.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Base64.php b/src/Base64.php
index df801cc..c29c080 100644
--- a/src/Base64.php
+++ b/src/Base64.php
@@ -163,7 +163,9 @@ abstract class Base64 implements EncoderInterface
}
}
if ($err !== 0) {
- return false;
+ throw new \RangeException(
+ 'Base64::decode() only expects characters in the correct base64 alphabet'
+ );
}
return $dest;
}