- Add Legal Office of the Master seal (SVG design with Maltese Cross, scales of justice, legal scroll) - Create legal-office-manifest-template.json for Legal Office credentials - Update SEAL_MAPPING.md and DESIGN_GUIDE.md with Legal Office seal documentation - Complete Azure CDN infrastructure deployment: - Resource group, storage account, and container created - 17 PNG seal files uploaded to Azure Blob Storage - All manifest templates updated with Azure URLs - Configuration files generated (azure-cdn-config.env) - Add comprehensive Azure CDN setup scripts and documentation - Fix manifest URL generation to prevent double slashes - Verify all seals accessible via HTTPS
34 lines
783 B
TypeScript
34 lines
783 B
TypeScript
/**
|
|
* Signature utilities for eIDAS/DID
|
|
*/
|
|
|
|
import { KMSClient } from './kms';
|
|
|
|
export interface SignatureOptions {
|
|
algorithm: 'RS256' | 'ES256' | 'EdDSA';
|
|
keyId: string;
|
|
}
|
|
|
|
export class SignatureService {
|
|
constructor(private kms: KMSClient) {}
|
|
|
|
async sign(data: Buffer, _options: SignatureOptions): Promise<Buffer> {
|
|
return await this.kms.sign(data);
|
|
}
|
|
|
|
async verify(
|
|
data: Buffer,
|
|
signature: Buffer,
|
|
_options: SignatureOptions
|
|
): Promise<boolean> {
|
|
return await this.kms.verify(data, signature);
|
|
}
|
|
|
|
async signJSON(data: unknown, options: SignatureOptions): Promise<string> {
|
|
const jsonString = JSON.stringify(data);
|
|
const signature = await this.sign(Buffer.from(jsonString), options);
|
|
return signature.toString('base64');
|
|
}
|
|
}
|
|
|