[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/paragonie/constant_time_encoding/src/ -> Base64.php (summary)

Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

File Size: 314 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  encode()
  encodeUnpadded()
  doEncode()
  decode()
  decodeNoPadding()
  decode6Bits()
  encode6Bits()

Functions
Functions that are not part of a class:

encode(string $binString)   X-Ref
Encode into Base64

Base64 character set "[A-Z][a-z][0-9]+/"

return: string
param: string $binString

encodeUnpadded(string $src)   X-Ref
Encode into Base64, no = padding

Base64 character set "[A-Z][a-z][0-9]+/"

return: string
param: string $src

doEncode(string $src, bool $pad = true)   X-Ref

return: string
param: string $src
param: bool $pad   Include = padding?

decode(string $encodedString, bool $strictPadding = false)   X-Ref
decode from base64 into binary

Base64 character set "./[A-Z][a-z][0-9]"

return: string
param: string $encodedString
param: bool $strictPadding

decodeNoPadding(string $encodedString)   X-Ref

return: string
param: string $encodedString

decode6Bits(int $src)   X-Ref
Uses bitwise operators instead of table-lookups to turn 6-bit integers
into 8-bit integers.

Base64 character set:
[A-Z]      [a-z]      [0-9]      +     /
0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f

return: int
param: int $src

encode6Bits(int $src)   X-Ref
Uses bitwise operators instead of table-lookups to turn 8-bit integers
into 6-bit integers.

return: string
param: int $src