keepassphp/lib/kdbxheader.php
private static function fieldToString($id, $value)
	{
		$l = strlen($value);
		return chr($id) . ($l == 0 ? "\x00\x00" : (pack("v", $l) . $value));
	}
private static function fieldToString($id, $value)
	{
		$l = strlen($value);
		return chr($id) . ($l == 0 ? "\x00\x00" : (pack("v", $l) . $value));
	}
private static function fieldToString ( $ id , $ value ) { $ l = strlen ( $ value ) ; return chr ( $ id ) . ( $ l == 0 ? "\x00\x00" : ( pack ( "v" , $ l ) . $ value ) ) ; }
Gets the binary format of the given header field.
@param $id The field id.
@param $value The field value.
@return A binary string representing the header field.
Gets the binary format of the given header field .