Lines Matching defs:pt
209 byteBuffer pt, ct;
219 pt = ccConditionalTextBuffer(plainText);
224 if((retval = CCCrypt(kCCEncrypt, alg, options, key->bytes, key->len, iv->bytes, pt->bytes, pt->len, cipherDataOut, 4096, &dataOutMoved)) != kCCSuccess) {
233 diag("Input Length %d Result: %s\n", (int) pt->len, bytesToHexString(bb));
250 if (!bytesAreEqual(pt, bb)) {
251 diag("FAIL Decrypt Output %s\nDecrypt Expect %s\n", bytesToHexString(bb), bytesToHexString(pt));
255 // if(ct->bytes && iv->bytes) diag("PASS Test for length %d\n", (int) pt->len);
256 // if(ct && (iv->bytes == NULL)) diag("PASS NULL IV Test for length %d\n", (int) pt->len);
258 free(pt);
272 byteBuffer pt, ct;
282 pt = ccConditionalTextBuffer(plainText);
287 if((retval = CCMultiCrypt(kCCEncrypt, alg, options, key->bytes, key->len, iv->bytes, pt->bytes, pt->len, cipherDataOut, 4096, &dataOutMoved)) != kCCSuccess) {
296 diag("Input Length %d Result: %s\n", (int) pt->len, bytesToHexString(bb));
313 if (!bytesAreEqual(pt, bb)) {
314 diag("FAIL Decrypt Output %s\nDecrypt Expect %s\n", bytesToHexString(bb), bytesToHexString(pt));
318 // if(ct && iv->bytes) diag("PASS Test for length %d\n", (int) pt->len);
319 // if(ct && (iv->bytes == NULL)) diag("PASS NULL IV Test for length %d\n", (int) pt->len);
321 free(pt);
336 byteBuffer pt, ct;
345 pt = ccConditionalTextBuffer(plainText);
349 if((retval = CCCryptWithMode(kCCEncrypt, mode, alg, padding, iv->bytes, key->bytes, key->len, NULL, 0, 0, 0, pt->bytes, pt->len,
359 diag("Input Length %d Result: %s\n", (int) pt->len, bytesToHexString(bb));
377 if (!bytesAreEqual(pt, bb)) {
378 diag("FAIL Decrypt Output %s\nDecrypt Expect %s\n", bytesToHexString(bb), bytesToHexString(pt));
382 // if(ct->bytes && iv->bytes) diag("PASS Test for length %d\n", (int) pt->len);
383 // if(ct->bytes && (iv->bytes == NULL)) diag("PASS NULL IV Test for length %d\n", (int) pt->len);
385 free(pt);
405 byteBuffer pt, ct;
413 pt = ccConditionalTextBuffer(plainText);
417 if((retval = CCMultiCryptWithMode(kCCEncrypt, mode, alg, padding, iv->bytes,key->bytes, key->len, NULL, 0,0, 0, pt->bytes, pt->len,
427 diag("Input Length %d Result: %s\n", (int) pt->len, bytesToHexString(bb));
445 if (!bytesAreEqual(pt, bb)) {
446 diag("FAIL Decrypt Output %s\nDecrypt Expect %s\n", bytesToHexString(bb), bytesToHexString(pt));
450 // if(ct && iv->bytes) diag("PASS Test for length %d\n", (int) pt->len);
451 // if(ct && (iv->bytes == NULL)) diag("PASS NULL IV Test for length %d\n", (int) pt->len);
453 free(pt);
539 byteBuffer pt, ct;
555 pt = ccConditionalTextBuffer(plainText);
559 dataLen = pt->len;
563 if((retval = CCCryptorGCM(kCCEncrypt, alg, key->bytes, key->len, iv->bytes, iv->len, adata->bytes, adata->len, pt->bytes, dataLen, cipherDataOut, tagDataOut, &tagDataOutlen)) != kCCSuccess) {
598 if (!bytesAreEqual(pt, bb)) {
599 diag("FAIL Decrypt Output %s\nDecrypt Expect %s\n", bytesToHexString(bb), bytesToHexString(pt));
612 free(pt);
624 byteBuffer pt, ct;
640 pt = ccConditionalTextBuffer(plainText);
644 dataLen = pt->len;
648 if((retval = CCCryptorGCMDiscreet(kCCEncrypt, alg, key->bytes, key->len, iv->bytes, iv->len, adata->bytes, adata->len, pt->bytes, dataLen, cipherDataOut, tagDataOut, &tagDataOutlen)) != kCCSuccess) {
684 if (!bytesAreEqual(pt, bb)) {
685 diag("FAIL Decrypt Output %s\nDecrypt Expect %s\n", bytesToHexString(bb), bytesToHexString(pt));
698 free(pt);