addCAKey

abstract fun addCAKey(capk: ByteArray)

Add a CAPK (Certificate Authority Public Key).

Parameters

capk

CAPK.

| Tag      | Description                           |
| :------- | :------------------------------------ |
| 0xDFA023 | Certificate authority public key |

The certificate authority structure contains the following data:

| Data            | Length       | Description                                 |
| :-------------- | :------      | :------------------------------------------ |
| RID             | 5 bytes      | Application brand identifier                |
| Index           | 1 byte       | Key index                                   |
| Hash indicator  | 1 byte       | RFU                                         |
| Algo. indicator | 1 byte       | RFU                                         |
| Modulus length  | 2 bytes      | Key modulus length                          |
| Modulus         | 256 bytes    | Key modulus (padded to 256 bytes with zeros |
| Exponent length | 1 byte       | Public exponent length                      |
| Exponent        | 1 or 3 bytes | Public exponent                             |
| Hash            | 20 bytes     | RFU                                         |

Throws

SwitcloudL2Exception

or any derived exception class.