Skip to content

RFC4648

Class RFC4648

This class conforms strictly to the RFC

  • Full name: \ParagonIE\ConstantTime\RFC4648
  • This class is an Abstract class

Methods

base64Encode

RFC 4648 Base64 encoding

public static base64Encode(string $str): string

"foo" -> "Zm9v"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base64Decode

RFC 4648 Base64 decoding

public static base64Decode(string $str): string

"Zm9v" -> "foo"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base64UrlSafeEncode

RFC 4648 Base64 (URL Safe) encoding

public static base64UrlSafeEncode(string $str): string

"foo" -> "Zm9v"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base64UrlSafeDecode

RFC 4648 Base64 (URL Safe) decoding

public static base64UrlSafeDecode(string $str): string

"Zm9v" -> "foo"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base32Encode

RFC 4648 Base32 encoding

public static base32Encode(string $str): string

"foo" -> "MZXW6==="

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base32Decode

RFC 4648 Base32 encoding

public static base32Decode(string $str): string

"MZXW6===" -> "foo"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base32HexEncode

RFC 4648 Base32-Hex encoding

public static base32HexEncode(string $str): string

"foo" -> "CPNMU==="

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base32HexDecode

RFC 4648 Base32-Hex decoding

public static base32HexDecode(string $str): string

"CPNMU===" -> "foo"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base16Encode

RFC 4648 Base16 decoding

public static base16Encode(string $str): string

"foo" -> "666F6F"

  • This method is static.

Parameters:

Parameter Type Description
$str string

Throws:


base16Decode

RFC 4648 Base16 decoding

public static base16Decode(string $str): string

"666F6F" -> "foo"

  • This method is static.

Parameters:

Parameter Type Description
$str string


Automatically generated on 2025-03-18