original_string: public function encrypt($plaintext, $key)
  	{
  		// Set up encryption parameters.
  		$inputData = cryptoHelpers::convertStringToByteArray($plaintext);
  		$keyAsNumbers = cryptoHelpers::toNumbers(bin2hex($key));
  		$keyLength = count($keyAsNumbers);
  		$iv = cryptoHelpers::generateSharedKey(16);
  
  		$encrypted = AES::encrypt(
  			$inputData,
  			AES::modeOfOperation_CBC,
  			$keyAsNumbers,
  			$keyLength,
  			$iv
  		);
  
  		$retVal = $encrypted['originalsize'] . self::SEPARATOR_CRYPTO_PARTS
  			. cryptoHelpers::toHex($iv) . self::SEPARATOR_CRYPTO_PARTS
  			. cryptoHelpers::toHex($encrypted['cipher']);
  
  		return self::IDENTIFIER . self::SEPARATOR_ALGORITHM . $retVal;
  	}
code: public function encrypt($plaintext, $key)
  	{
  		// Set up encryption parameters.
  		$inputData = cryptoHelpers::convertStringToByteArray($plaintext);
  		$keyAsNumbers = cryptoHelpers::toNumbers(bin2hex($key));
  		$keyLength = count($keyAsNumbers);
  		$iv = cryptoHelpers::generateSharedKey(16);
  
  		$encrypted = AES::encrypt(
  			$inputData,
  			AES::modeOfOperation_CBC,
  			$keyAsNumbers,
  			$keyLength,
  			$iv
  		);
  
  		$retVal = $encrypted['originalsize'] . self::SEPARATOR_CRYPTO_PARTS
  			. cryptoHelpers::toHex($iv) . self::SEPARATOR_CRYPTO_PARTS
  			. cryptoHelpers::toHex($encrypted['cipher']);
  
  		return self::IDENTIFIER . self::SEPARATOR_ALGORITHM . $retVal;
  	}
code_tokens: public function encrypt ( $ plaintext , $ key ) { // Set up encryption parameters. $ inputData = cryptoHelpers :: convertStringToByteArray ( $ plaintext ) ; $ keyAsNumbers = cryptoHelpers :: toNumbers ( bin2hex ( $ key ) ) ; $ keyLength = count ( $ keyAsNumbers ) ; $ iv = cryptoHelpers :: generateSharedKey ( 16 ) ; $ encrypted = AES :: encrypt ( $ inputData , AES :: modeOfOperation_CBC , $ keyAsNumbers , $ keyLength , $ iv ) ; $ retVal = $ encrypted [ 'originalsize' ] . self :: SEPARATOR_CRYPTO_PARTS . cryptoHelpers :: toHex ( $ iv ) . self :: SEPARATOR_CRYPTO_PARTS . cryptoHelpers :: toHex ( $ encrypted [ 'cipher' ] ) ; return self :: IDENTIFIER . self :: SEPARATOR_ALGORITHM . $ retVal ; }
docstring: encrypts the given plain text with a key
  
  @param string $plaintext
  @param string $key
  
  @return string
docstring_tokens: encrypts the given plain text with a key