@@ -21,7 +21,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
2121 const keys : string [ ] = [ ] ;
2222 OBJECT_TYPES . forEach ( ( objectClass ) => {
2323 this . crypto . session ! . find ( { class : objectClass , token : true } , ( obj ) => {
24- const item = obj . toType < any > ( ) ;
24+ const item = obj . toType < graphene . Key > ( ) ;
2525 keys . push ( CryptoKey . getID ( item ) ) ;
2626 } ) ;
2727 } ) ;
@@ -51,6 +51,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
5151 /** @deprecated Use getItem(index, algorithm, extractable, keyUsages) */
5252 public async getItem ( key : string , algorithm : Algorithm , usages : KeyUsage [ ] ) : Promise < CryptoKey > ;
5353 public async getItem ( index : string , algorithm : core . ImportAlgorithms , extractable : boolean , keyUsages : KeyUsage [ ] ) : Promise < CryptoKey > ;
54+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5455 public async getItem ( key : string , ...args : any [ ] ) : Promise < CryptoKey > {
5556 const subjectObject = this . getItemById ( key ) ;
5657 if ( subjectObject ) {
@@ -86,6 +87,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
8687 } else {
8788 alg . name = "RSA-OAEP" ;
8889 }
90+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8991 ( alg as any ) . hash = { name : "SHA-256" } ;
9092 break ;
9193 }
@@ -172,7 +174,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
172174 }
173175 } ) ;
174176 const obj = this . crypto . session . copy ( p11Key . key , template ) ;
175- return CryptoKey . getID ( obj . toType < any > ( ) ) ;
177+ return CryptoKey . getID ( obj . toType < graphene . Key > ( ) ) ;
176178 } else {
177179 return data . id ;
178180 }
@@ -189,7 +191,7 @@ export class KeyStorage implements core.CryptoKeyStorage {
189191 let key : graphene . SessionObject | null = null ;
190192 OBJECT_TYPES . forEach ( ( objectClass ) => {
191193 this . crypto . session ! . find ( { class : objectClass , token : true } , ( obj ) => {
192- const item = obj . toType < any > ( ) ;
194+ const item = obj . toType < graphene . Key > ( ) ;
193195 if ( id === CryptoKey . getID ( item ) ) {
194196 key = item ;
195197 return false ;
0 commit comments