Skip to main content
Glama
decryptFontBridge.js1.08 kB
import crypto from 'crypto'; /** * Decrypts a value using AES decryption * @param {string} value - The encrypted value (base64 encoded) * @returns {string} The decrypted value or empty string if decryption fails */ export function decrypt(value) { const asevkry = "QpqpUVcZd+dYeuyvDa/N2iEb9qZoUBLWimYJorfWmdU="; const asiv = "HIkJ6JB5zOhaYRTdfLt9+A=="; if (!value || value === '') return ''; try { const key = Buffer.from(asevkry, 'base64'); const iv = Buffer.from(asiv, 'base64'); // Replace spaces with '+' as in the original C# code value = value.replace(/ /g, '+'); const encryptedBuffer = Buffer.from(value, 'base64'); const decipher = crypto.createDecipheriv('aes-256-cbc', key, iv); let decrypted = decipher.update(encryptedBuffer); decrypted = Buffer.concat([decrypted, decipher.final()]); return decrypted.toString('utf8'); } catch (error) { console.error('Decryption error:', error.message); return ''; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/manishgadhock-monotype/monotype-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server