UNPKG

@szegedsw/lib-node

Version:

A little framework published by Szeged Software Zrt. in order to enhance api endpoint security and create reuseable code. Email module, Logging system, and much more. Further improvements are expected.

24 lines 859 B
export interface ISigned { signature: string; } export interface IExtendable { [key: string]: any; } export declare enum SecretToUse { AES = 0, HMAC = 1 } export declare class Crypt { static secrets: string[]; private static iv; private static maxlen; static init(secrets: string[], initvector: string): void; static encryptAES256(text: string, secretId: SecretToUse | number): string; static decryptAES256(text: string, secretId: SecretToUse | number): string; static hmacSHA512(text: string, secretId: SecretToUse | number): string; private static checkLength; static sign<T extends IExtendable>(obj: T, skipProperties?: string[]): T & ISigned; static checkSignature<T extends IExtendable>(obj: T, skipProperties?: string[]): boolean; private static toString; } //# sourceMappingURL=crypt.d.ts.map