FOF30\Encrypt\Base32::encode PHP Method

encode() public method

..
public encode ( string $str ) : string
$str string The string to convert
return string The converted base32 string
    public function encode($str)
    {
        return $this->fromBin($this->str2bin($str));
    }

Usage Example

Beispiel #1
0
 /**
  *
  * @return  void
  */
 public function testEncode()
 {
     $this->assertEquals('MFRGGZDFMZTWQ2LLNRWW433QOFZHG5DVOZ3XQ6L2GEZDGNBVGY3TQOJQIFBEGRCFIZDUQSKLJRGU4T2QKFJFGVCVKZLVQWK2FIRS2LRMEERMFJZEEUTC6KBJHU7UAQCALQVA', $this->base32->encode('abcdefghiklmnopqrstuvwxyz1234567890ABCDEFGHIKLMNOPQRSTUVWXYZ*#-.,!"ยง$%&/()=?@@@\\*'));
 }