Пример #1
0
function padMessage($plaintext)
{
    $padded = '';
    $padded .= chr(10);
    $padded .= encodeInt7bit(strlen($plaintext));
    $padded .= $plaintext;
    $padded .= chr(1);
    return $padded;
}
Пример #2
0
function padMessage($plaintext)
{
    $padded = "";
    $padded .= "\n";
    $padded .= encodeInt7bit(strlen($plaintext));
    $padded .= $plaintext;
    $padded .= chr("");
    $plaintext = $padded;
    return $plaintext;
}