FOF30\Encrypt\Base32::encode PHP Méthode

encode() public méthode

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

Usage Example

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