
import { NativeCryptoKey } from "webcrypto-core";
import { CryptoKey } from "./key";

export class WrappedNativeCryptoKey extends CryptoKey {

  // tslint:disable-next-line: member-access
  #nativeKey: CryptoKey;

  constructor(
    algorithm: KeyAlgorithm,
    extractable: boolean,
    type: KeyType,
    usages: KeyUsage[],
    nativeKey: NativeCryptoKey) {
    super(algorithm, extractable, type, usages);
    this.#nativeKey = nativeKey;
  }

  // @internal
  public getNative() {
    return this.#nativeKey;
  }

}


import { NativeCryptoKey } from "webcrypto-core";
import { CryptoKey } from "./key";

export class WrappedNativeCryptoKey extends CryptoKey {

  constructor(
    algorithm: KeyAlgorithm,
    extractable: boolean,
    type: KeyType,
    usages: KeyUsage[],
    public nativeKey: NativeCryptoKey) {
    super(algorithm, extractable, type, usages);
  }

}

--- 
+++ 
@@ -4,13 +4,22 @@
 
 export class WrappedNativeCryptoKey extends CryptoKey {
 
+  // tslint:disable-next-line: member-access
+  #nativeKey: CryptoKey;
+
   constructor(
     algorithm: KeyAlgorithm,
     extractable: boolean,
     type: KeyType,
     usages: KeyUsage[],
-    public nativeKey: NativeCryptoKey) {
+    nativeKey: NativeCryptoKey) {
     super(algorithm, extractable, type, usages);
+    this.#nativeKey = nativeKey;
+  }
+
+  // @internal
+  public getNative() {
+    return this.#nativeKey;
   }
 
 }
chore: Move nativeKey to private field
