saveBytesToChecksummedAsciiSafeString() public static method

INTERNAL USE ONLY: Applies a version header, applies a checksum, and then encodes a byte string into a range of printable ASCII characters.
public static saveBytesToChecksummedAsciiSafeString ( string $header, string $bytes ) : string
$header string
$bytes string
return string
 /**
  * @expectedException \Defuse\Crypto\Exception\BadFormatException
  * @expectedExceptionMessage not a hex string
  */
 public function testBadHexEncoding()
 {
     $header = Core::secureRandom(Core::HEADER_VERSION_SIZE);
     $str = Encoding::saveBytesToChecksummedAsciiSafeString($header, Core::secureRandom(Core::KEY_BYTE_SIZE));
     $str[0] = 'Z';
     Encoding::loadBytesFromChecksummedAsciiSafeString($header, $str);
 }