private function pemDataClean($value)
    {
        $value = str_ireplace('-----BEGIN EC PRIVATE KEY-----', '', $value);
        $value = str_ireplace('-----END EC PRIVATE KEY-----', '', $value);
        $value = str_ireplace("\r", '', trim($value));
        $value = str_ireplace("\n", '', trim($value));
        $value = str_ireplace(' ', '', trim($value));

        return $value;
    }