| Cryptographic Token Interface Standard | 
 PKCS#11  | 
CAST secret key objects (object class CKO_SECRET_KEY, key type CKK_CAST) hold CAST keys. The following table defines the CAST secret key object attributes, in addition to the common attributes listed in Table 14 , Table 18 , Table 24 , and Table 39 :
Table 47, CAST Secret Key Object Attributes
| Attribute | Data type | Meaning | 
| CKA_VALUE1,4,6,7 | Byte array | Key value (1 to 8 bytes) | 
| CKA_VALUE_LEN2,3,6 | CK_ULONG | Length in bytes of key value | 
The following is a sample template for creating a CAST secret key object:
CK_OBJECT_CLASS class = CKO_SECRET_KEY; CK_KEY_TYPE keyType = CKK_CAST; CK_UTF8CHAR label[] = "A CAST secret key object"; CK_BYTE value[] = {...}; CK_BBOOL true = TRUE; CK_ATTRIBUTE template[] = { {CKA_CLASS, &class, sizeof(class)}, {CKA_KEY_TYPE, &keyType, sizeof(keyType)}, {CKA_TOKEN, &true, sizeof(true)}, {CKA_LABEL, label, sizeof(label)-1}, {CKA_ENCRYPT, &true, sizeof(true)}, {CKA_VALUE, value, sizeof(value)} };