is_base64¶
-
privex.helpers.crypto.base.is_base64(sb: Union[str, bytes], urlsafe: bool = True) → bool[source]¶ Returns
Trueifsbappears to be a Base64 encoded string/bytes, otherwiseFalse- Parameters
sb (str|bytes) – Data to check for base64 encoding
urlsafe (bool) – (Default:
True) Usebase64.urlsafe_b64encode()and decode, instead of plainbase64.b64encode()and decode.
- Return bool is_base64
Trueif data appears to be Base64, otherwiseFalse