public int nabtoGetFingerprint(string certId, out byte[] fingerprint)
        {
            int status;

            fingerprint = null;
            IntPtr unmanagedFingerprintBuffer = IntPtr.Zero;

            try
            {
                unmanagedFingerprintBuffer = Marshal.AllocHGlobal(16);

                status = Win32NativeMethods.nabtoGetFingerprint(certId, unmanagedFingerprintBuffer);

                if (status == NABTO_OK)
                {
                    fingerprint = new byte[16];
                    Marshal.Copy(unmanagedFingerprintBuffer, fingerprint, 0, 16);
                }
            }

            finally
            {
                if (unmanagedFingerprintBuffer != IntPtr.Zero)
                {
                    Marshal.FreeHGlobal(unmanagedFingerprintBuffer);
                }
            }

            return(status);
        }