@@ -277,6 +277,8 @@ const vectors = {
277
277
278
278
assert . strictEqual ( publicKey . type , 'public' ) ;
279
279
assert . strictEqual ( privateKey . type , 'private' ) ;
280
+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
281
+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
280
282
assert . strictEqual ( publicKey . extractable , true ) ;
281
283
assert . strictEqual ( privateKey . extractable , true ) ;
282
284
assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
@@ -439,6 +441,8 @@ const vectors = {
439
441
440
442
assert . strictEqual ( publicKey . type , 'public' ) ;
441
443
assert . strictEqual ( privateKey . type , 'private' ) ;
444
+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
445
+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
442
446
assert . strictEqual ( publicKey . extractable , true ) ;
443
447
assert . strictEqual ( privateKey . extractable , true ) ;
444
448
assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
@@ -503,6 +507,7 @@ const vectors = {
503
507
assert ( isCryptoKey ( key ) ) ;
504
508
505
509
assert . strictEqual ( key . type , 'secret' ) ;
510
+ assert . strictEqual ( key . toString ( ) , '[object CryptoKey]' ) ;
506
511
assert . strictEqual ( key . extractable , true ) ;
507
512
assert . deepStrictEqual ( key . usages , usages ) ;
508
513
assert . strictEqual ( key . algorithm . name , name ) ;
@@ -562,6 +567,7 @@ const vectors = {
562
567
assert ( isCryptoKey ( key ) ) ;
563
568
564
569
assert . strictEqual ( key . type , 'secret' ) ;
570
+ assert . strictEqual ( key . toString ( ) , '[object CryptoKey]' ) ;
565
571
assert . strictEqual ( key . extractable , true ) ;
566
572
assert . deepStrictEqual ( key . usages , usages ) ;
567
573
assert . strictEqual ( key . algorithm . name , 'HMAC' ) ;
@@ -629,6 +635,8 @@ assert.throws(() => new CryptoKey(), { code: 'ERR_ILLEGAL_CONSTRUCTOR' });
629
635
630
636
assert . strictEqual ( publicKey . type , 'public' ) ;
631
637
assert . strictEqual ( privateKey . type , 'private' ) ;
638
+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
639
+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
632
640
assert . strictEqual ( publicKey . extractable , true ) ;
633
641
assert . strictEqual ( privateKey . extractable , true ) ;
634
642
assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
0 commit comments