<?php
// MacAddress.php
// Copyright P.Kassel, M.Seliger, G.Trietsch, all Rights Reserved
namespace Docuform\Lib;class MacAddress{public static function toString($hex):string{$result=$hex;if(is_string($hex)){$parts=str_split($hex,2);if(is_array($parts)&&count($parts)===6){$result=strtoupper(vsprintf('%s-%s-%s-%s-%s-%s',$parts));}}return is_string($result)?$result:'';}public static function toHex($string):string{$hex=strtoupper(str_replace('-','',$string));$hex=str_replace(':','',$hex);return $hex;}}