Aes256CbcKey is a symmetric encryption key, consisting of one 256-bit key,
used to decrypt legacy type 0 enc strings. The data is not authenticated
so this should be used with caution, and removed where possible.
XChaCha20Poly1305Key is a symmetric encryption key consisting
of one 256-bit key, and contains a key id. In contrast to the
Aes256CbcKey and Aes256CbcHmacKey, this key type is used to create
CoseEncrypt0 messages.
Pad a key to a minimum length using PKCS7-like padding.
The last N bytes of the padded bytes all have the value N.
For example, padded to size 4, the value 0,0 becomes 0,0,2,2.
Unpad a key that is padded using the PKCS7-like padding defined by pad_key.
The last N bytes of the padded bytes all have the value N.
For example, padded to size 4, the value 0,0 becomes 0,0,2,2.