<?php
namespace MOC\Pivot\MailObfuscator;

use TYPO3\Flow\Annotations as Flow;

class Mailto2HrefObfuscatingConverter extends \Networkteam\Neos\MailObfuscator\String\Converter\Mailto2HrefObfuscatingConverter {

	/**
	 * {@inheritdoc}
	 */
	public function convert($mailAddress) {
		$this->randomOffset = rand(1, 26);
		return 'javascript:decrypt(\'' . $this->encryptEmail($mailAddress) . '\', -' . $this->randomOffset . ')';
	}
}