6 lines
204 B
TypeScript
6 lines
204 B
TypeScript
import { createHmac } from 'crypto';
|
|
|
|
export function chatChannelId(slug: string, secret: string): string {
|
|
return createHmac('sha256', secret).update(`chat:${slug}`).digest('hex').slice(0, 32);
|
|
}
|