@@ -278,6 +278,8 @@ const vectors = {
278
278
279
279
assert . strictEqual ( publicKey . type , 'public' ) ;
280
280
assert . strictEqual ( privateKey . type , 'private' ) ;
281
+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
282
+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
281
283
assert . strictEqual ( publicKey . extractable , true ) ;
282
284
assert . strictEqual ( privateKey . extractable , true ) ;
283
285
assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
@@ -430,6 +432,8 @@ const vectors = {
430
432
431
433
assert . strictEqual ( publicKey . type , 'public' ) ;
432
434
assert . strictEqual ( privateKey . type , 'private' ) ;
435
+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
436
+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
433
437
assert . strictEqual ( publicKey . extractable , true ) ;
434
438
assert . strictEqual ( privateKey . extractable , true ) ;
435
439
assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
@@ -499,6 +503,7 @@ const vectors = {
499
503
assert ( isCryptoKey ( key ) ) ;
500
504
501
505
assert . strictEqual ( key . type , 'secret' ) ;
506
+ assert . strictEqual ( key . toString ( ) , '[object CryptoKey]' ) ;
502
507
assert . strictEqual ( key . extractable , true ) ;
503
508
assert . deepStrictEqual ( key . usages , usages ) ;
504
509
assert . strictEqual ( key . algorithm . name , name ) ;
@@ -557,6 +562,7 @@ const vectors = {
557
562
assert ( isCryptoKey ( key ) ) ;
558
563
559
564
assert . strictEqual ( key . type , 'secret' ) ;
565
+ assert . strictEqual ( key . toString ( ) , '[object CryptoKey]' ) ;
560
566
assert . strictEqual ( key . extractable , true ) ;
561
567
assert . deepStrictEqual ( key . usages , usages ) ;
562
568
assert . strictEqual ( key . algorithm . name , 'HMAC' ) ;
@@ -618,6 +624,8 @@ assert.throws(() => new CryptoKey(), { code: 'ERR_ILLEGAL_CONSTRUCTOR' });
618
624
619
625
assert . strictEqual ( publicKey . type , 'public' ) ;
620
626
assert . strictEqual ( privateKey . type , 'private' ) ;
627
+ assert . strictEqual ( publicKey . toString ( ) , '[object CryptoKey]' ) ;
628
+ assert . strictEqual ( privateKey . toString ( ) , '[object CryptoKey]' ) ;
621
629
assert . strictEqual ( publicKey . extractable , true ) ;
622
630
assert . strictEqual ( privateKey . extractable , true ) ;
623
631
assert . deepStrictEqual ( publicKey . usages , publicUsages ) ;
0 commit comments