mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2025-05-23 16:27:41 +08:00
18 lines
546 B
TypeScript
18 lines
546 B
TypeScript
import type { DecryptCommandOptions } from '~/decrypt-worker/types';
|
|
|
|
export interface CryptoBase {
|
|
cryptoName: string;
|
|
checkByDecryptHeader: boolean;
|
|
|
|
/**
|
|
* If set, this new extension will be used instead.
|
|
* Useful for non-audio format, e.g. qrc to lrc/xml.
|
|
*/
|
|
overrideExtension?: string;
|
|
|
|
checkBySignature?: (buffer: ArrayBuffer, options: DecryptCommandOptions) => Promise<boolean>;
|
|
decrypt(buffer: ArrayBuffer, options: DecryptCommandOptions): Promise<Blob | ArrayBuffer>;
|
|
}
|
|
|
|
export type CryptoFactory = () => CryptoBase;
|