@@ -277,6 +277,8 @@ const vectors = {
277277
278278 assert . strictEqual ( publicKey . type , 'public' ) ;
279279 assert . strictEqual ( privateKey . type , 'private' ) ;
280+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
281+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
280282 assert . strictEqual ( publicKey . extractable , true ) ;
281283 assert . strictEqual ( privateKey . extractable , true ) ;
282284 assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
@@ -439,6 +441,8 @@ const vectors = {
439441
440442 assert . strictEqual ( publicKey . type , 'public' ) ;
441443 assert . strictEqual ( privateKey . type , 'private' ) ;
444+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
445+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
442446 assert . strictEqual ( publicKey . extractable , true ) ;
443447 assert . strictEqual ( privateKey . extractable , true ) ;
444448 assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
@@ -503,6 +507,7 @@ const vectors = {
503507 assert ( isCryptoKey ( key ) ) ;
504508
505509 assert . strictEqual ( key . type , 'secret' ) ;
510+ assert . strictEqual ( key . toString ( ) , '[object CryptoKey]' ) ;
506511 assert . strictEqual ( key . extractable , true ) ;
507512 assert . deepStrictEqual ( key . usages , usages ) ;
508513 assert . strictEqual ( key . algorithm . name , name ) ;
@@ -562,6 +567,7 @@ const vectors = {
562567 assert ( isCryptoKey ( key ) ) ;
563568
564569 assert . strictEqual ( key . type , 'secret' ) ;
570+ assert . strictEqual ( key . toString ( ) , '[object CryptoKey]' ) ;
565571 assert . strictEqual ( key . extractable , true ) ;
566572 assert . deepStrictEqual ( key . usages , usages ) ;
567573 assert . strictEqual ( key . algorithm . name , 'HMAC' ) ;
@@ -629,6 +635,8 @@ assert.throws(() => new CryptoKey(), { code: 'ERR_ILLEGAL_CONSTRUCTOR' });
629635
630636 assert . strictEqual ( publicKey . type , 'public' ) ;
631637 assert . strictEqual ( privateKey . type , 'private' ) ;
638+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
639+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
632640 assert . strictEqual ( publicKey . extractable , true ) ;
633641 assert . strictEqual ( privateKey . extractable , true ) ;
634642 assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
0 commit comments