perf: 支持七牛云

This commit is contained in:
xiaojunnuo
2024-09-24 13:50:06 +08:00
parent 8de56feeb7
commit 8ecc2f9446
16 changed files with 240 additions and 8 deletions
@@ -201,9 +201,6 @@ async function getWebCryptoKeyPair(keyPem) {
}
/* Decode PEM and import into CryptoKeyPair */
if (encodingType === 'pkcs1') {
encodingType = 'pkcs8';
}
const privateKeyDec = x509.PemConverter.decodeFirst(keyPem.toString());
const privateKey = await crypto.webcrypto.subtle.importKey('pkcs8', privateKeyDec, sigalg, true, ['sign']);
const publicKey = await crypto.webcrypto.subtle.importKey('jwk', jwk, sigalg, true, ['verify']);
+1 -1
View File
@@ -12,7 +12,7 @@ export type AccessDefine = Registrable & {
};
};
export interface IAccessService {
getById(id: any): Promise<any>;
getById<T = any>(id: any): Promise<T>;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface