A model representing a SecKey with its properties and capabilities

interface SecKeyViewModel {
    bitSize?: null | number;
    blockSize?: null | number;
    canDecrypt: boolean;
    canDerive: boolean;
    canEncrypt: boolean;
    canSign: boolean;
    canUnwrap: boolean;
    canVerify: boolean;
    canWrap: boolean;
    effectiveSize?: null | number;
    externalRepresentation?: null | string;
    isPermanent?: null | boolean;
    keyId?: null | string;
    type?: null | "RSA" | "Elliptic Curve" | "Elliptic Curve (Prime Random)";
}

Properties

bitSize?: null | number

Size of the key in bits

blockSize?: null | number

Block size of the key

canDecrypt: boolean

Whether the key can be used for decryption

canDerive: boolean

Whether the key can be used for key derivation

canEncrypt: boolean

Whether the key can be used for encryption

canSign: boolean

Whether the key can be used for signing

canUnwrap: boolean

Whether the key can be used for unwrapping another key

canVerify: boolean

Whether the key can be used for verification

canWrap: boolean

Whether the key can be used for wrapping another key

effectiveSize?: null | number

Effective size of the key in bits

externalRepresentation?: null | string

Base64 encoded external representation of the key

isPermanent?: null | boolean

Whether the key is stored permanently in the keychain

keyId?: null | string

Base64 encoded representation of the application label data

type?: null | "RSA" | "Elliptic Curve" | "Elliptic Curve (Prime Random)"

Type of the key (RSA, Elliptic Curve, etc.)