1274 * @param pEncryptedPart the encrypted data part to decrypt and to verify 1275 * and the data part's length 1276 * (PKCS#11 param: CK_BYTE_PTR pEncryptedPart, 1277 * CK_ULONG ulEncryptedPartLen) 1278 * @return the decrypted and verified data part and the data part's length 1279 * (PKCS#11 param: CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen) 1280 * @exception PKCS11Exception If function returns other value than CKR_OK. 1281 * @preconditions (pEncryptedPart <> null) 1282 * @postconditions 1283 */ 1284 // public native byte[] C_DecryptVerifyUpdate(long hSession, 1285 // byte[] pEncryptedPart) throws PKCS11Exception; 1286 1287 1288 1289 /* ***************************************************************************** 1290 * Key management 1291 ******************************************************************************/ 1292 1293 /** 1294 * C_GenerateKey generates a secret key, creating a new key 1295 * object. 1296 * (Key management) 1297 * 1298 * @param hSession the session's handle 1299 * (PKCS#11 param: CK_SESSION_HANDLE hSession) 1300 * @param pMechanism the key generation mechanism 1301 * (PKCS#11 param: CK_MECHANISM_PTR pMechanism) 1302 * @param pTemplate the template for the new key and the number of 1303 * attributes in the template 1304 * (PKCS#11 param: CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount) 1305 * @return the handle of the new key 1306 * (PKCS#11 param: CK_OBJECT_HANDLE_PTR phKey) 1307 * @exception PKCS11Exception If function returns other value than CKR_OK. 1308 * @preconditions 1309 * @postconditions 1310 */ 1311 public native long C_GenerateKey(long hSession, CK_MECHANISM pMechanism, 1312 CK_ATTRIBUTE[] pTemplate) throws PKCS11Exception; 1313 | 1274 * @param pEncryptedPart the encrypted data part to decrypt and to verify 1275 * and the data part's length 1276 * (PKCS#11 param: CK_BYTE_PTR pEncryptedPart, 1277 * CK_ULONG ulEncryptedPartLen) 1278 * @return the decrypted and verified data part and the data part's length 1279 * (PKCS#11 param: CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen) 1280 * @exception PKCS11Exception If function returns other value than CKR_OK. 1281 * @preconditions (pEncryptedPart <> null) 1282 * @postconditions 1283 */ 1284 // public native byte[] C_DecryptVerifyUpdate(long hSession, 1285 // byte[] pEncryptedPart) throws PKCS11Exception; 1286 1287 1288 1289 /* ***************************************************************************** 1290 * Key management 1291 ******************************************************************************/ 1292 1293 /** 1294 * getNativeKeyInfo gets the key object attributes and values as an opaque 1295 * byte array to be used in createNativeKey method. 1296 * (Key management) 1297 * 1298 * @param hSession the session's handle 1299 * @param hKey key's handle 1300 * @param hWrappingKey wrapping key's handle to extract sensible keys. 1301 * -1 if not used. 1302 * @return an opaque byte array containing the key object attributes 1303 * and values 1304 * @exception PKCS11Exception If an internal PKCS#11 function returns other 1305 * value than CKR_OK. 1306 * @preconditions 1307 * @postconditions 1308 */ 1309 public native byte[] getNativeKeyInfo(long hSession, long hKey, 1310 long hWrappingKey) throws PKCS11Exception; 1311 1312 /** 1313 * createNativeKey creates a key object with attributes and values 1314 * specified by parameter as an opaque byte array. 1315 * (Key management) 1316 * 1317 * @param hSession the session's handle 1318 * @param keyInfo opaque byte array containing key object attributes 1319 * and values 1320 * @param hWrappingKey wrapping key's handle for extracted sensible keys. 1321 * -1 if not used. 1322 * @return key object handle 1323 * @exception PKCS11Exception If an internal PKCS#11 function returns other 1324 * value than CKR_OK. 1325 * @preconditions 1326 * @postconditions 1327 */ 1328 public native long createNativeKey(long hSession, byte[] keyInfo, 1329 long hWrappingKey) throws PKCS11Exception; 1330 1331 /** 1332 * C_GenerateKey generates a secret key, creating a new key 1333 * object. 1334 * (Key management) 1335 * 1336 * @param hSession the session's handle 1337 * (PKCS#11 param: CK_SESSION_HANDLE hSession) 1338 * @param pMechanism the key generation mechanism 1339 * (PKCS#11 param: CK_MECHANISM_PTR pMechanism) 1340 * @param pTemplate the template for the new key and the number of 1341 * attributes in the template 1342 * (PKCS#11 param: CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount) 1343 * @return the handle of the new key 1344 * (PKCS#11 param: CK_OBJECT_HANDLE_PTR phKey) 1345 * @exception PKCS11Exception If function returns other value than CKR_OK. 1346 * @preconditions 1347 * @postconditions 1348 */ 1349 public native long C_GenerateKey(long hSession, CK_MECHANISM pMechanism, 1350 CK_ATTRIBUTE[] pTemplate) throws PKCS11Exception; 1351 |