hwsecurity-openpgp / de.cotech.hw.openpgp / OpenPgpSecurityKey / setupPairedKey /

setupPairedKey

open fun setupPairedKey(pinProvider: PinProvider, setupAlgorithm: OpenPgpSecurityKey.AlgorithmConfig): PairedSecurityKey

This methods sets up the connected security key for signing, encryption, and authentication.

  1. Wipes current data on the security key
  2. Generates a new key pair, storing the private pair on the security key
  3. Returns a PairedSecurityKey with the info
  4. Locks the security key with a pin, provided by the PinProvider parameter

See also

Name Summary
de.cotech.hw.openpgp.pairedkey.PairedSecurityKey
PinProvider
de.cotech.hw.openpgp.OpenPgpSecurityKey.AlgorithmConfig This method directly performs IO with the security token, and should therefore not be called on the UI thread.

@ Deprecated()

open fun setupPairedKey(pinProvider: PinProvider~~)~~~~:~~ PairedSecurityKey
@ Deprecated()

open fun setupPairedKey(newPin: ByteSecret~~,~~ ~~newPuk~~~~:~~ ~~ByteSecret~~~~)~~~~:~~ PairedSecurityKey
@ Deprecated()

open fun setupPairedKey(newPin: ByteSecret~~,~~ ~~newPuk~~~~:~~ ~~ByteSecret~~~~,~~ ~~encryptionOnly~~~~:~~ Boolean~~)~~~~:~~ PairedSecurityKey
open fun setupPairedKey(newPin: ByteSecret, newPuk: ByteSecret, algorithmConfig: OpenPgpSecurityKey.AlgorithmConfig): PairedSecurityKey