secureHandle abstract method

  1. @experimental
SecureKey secureHandle(
  1. dynamic nativeHandle
)

Creates a secure key from a previously extracted SecureKey.nativeHandle.

Dangerous API. Only use if you have no other choice and you know what you are doing. You have been warned!

Creating such a secure key will not create a copy of it, but instead operate on the same low-level data. This means, if you take the handle from one key and create a new one using this method, both SecureKey instances will point to the same data.

Important: Since multiple keys to the same handle all operate on the same data, disposing one will dispose all, and changes to one immediatly are reflected to the others. When using a handle across isolate boundaries, make sure the different isolates never access the key at the same time, as that might break the native code.

Implementation

@experimental
SecureKey secureHandle(dynamic nativeHandle);