@@ -21,7 +21,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
21
21
const keys : string [ ] = [ ] ;
22
22
OBJECT_TYPES . forEach ( ( objectClass ) => {
23
23
this . crypto . session ! . find ( { class : objectClass , token : true } , ( obj ) => {
24
- const item = obj . toType < any > ( ) ;
24
+ const item = obj . toType < graphene . Key > ( ) ;
25
25
keys . push ( CryptoKey . getID ( item ) ) ;
26
26
} ) ;
27
27
} ) ;
@@ -51,6 +51,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
51
51
/** @deprecated Use getItem(index, algorithm, extractable, keyUsages) */
52
52
public async getItem ( key : string , algorithm : Algorithm , usages : KeyUsage [ ] ) : Promise < CryptoKey > ;
53
53
public async getItem ( index : string , algorithm : core . ImportAlgorithms , extractable : boolean , keyUsages : KeyUsage [ ] ) : Promise < CryptoKey > ;
54
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
55
public async getItem ( key : string , ...args : any [ ] ) : Promise < CryptoKey > {
55
56
const subjectObject = this . getItemById ( key ) ;
56
57
if ( subjectObject ) {
@@ -86,6 +87,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
86
87
} else {
87
88
alg . name = "RSA-OAEP" ;
88
89
}
90
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
89
91
( alg as any ) . hash = { name : "SHA-256" } ;
90
92
break ;
91
93
}
@@ -172,7 +174,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
172
174
}
173
175
} ) ;
174
176
const obj = this . crypto . session . copy ( p11Key . key , template ) ;
175
- return CryptoKey . getID ( obj . toType < any > ( ) ) ;
177
+ return CryptoKey . getID ( obj . toType < graphene . Key > ( ) ) ;
176
178
} else {
177
179
return data . id ;
178
180
}
@@ -189,7 +191,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
189
191
let key : graphene . SessionObject | null = null ;
190
192
OBJECT_TYPES . forEach ( ( objectClass ) => {
191
193
this . crypto . session ! . find ( { class : objectClass , token : true } , ( obj ) => {
192
- const item = obj . toType < any > ( ) ;
194
+ const item = obj . toType < graphene . Key > ( ) ;
193
195
if ( id === CryptoKey . getID ( item ) ) {
194
196
key = item ;
195
197
return false ;
0 commit comments