I need to transform this encryption function developed in C# to PHP.
private static byte[] GetHMACSHA256(string data, byte[] key) { byte[] dataByt