Documentation/Source/eric5.Utilities.crypto.py3AES.html

changeset 3019
7912530a33e2
parent 3018
70924c0bdaf1
equal deleted inserted replaced
3018:70924c0bdaf1 3019:7912530a33e2
415 </p><dl> 415 </p><dl>
416 <dt><i>data</i></dt> 416 <dt><i>data</i></dt>
417 <dd> 417 <dd>
418 data of size 4 (bytearray) 418 data of size 4 (bytearray)
419 </dd> 419 </dd>
420 </dl><dl>
421 <dt>Returns:</dt>
422 <dd>
423 rotated data (bytearray)
424 </dd>
420 </dl><a NAME="AES.__shiftRow" ID="AES.__shiftRow"></a> 425 </dl><a NAME="AES.__shiftRow" ID="AES.__shiftRow"></a>
421 <h4>AES.__shiftRow</h4> 426 <h4>AES.__shiftRow</h4>
422 <b>__shiftRow</b>(<i>state, statePointer, nbr, isInv</i>) 427 <b>__shiftRow</b>(<i>state, statePointer, nbr, isInv</i>)
423 <p> 428 <p>
424 Private method to shift the bytes of a row to the left. 429 Private method to shift the bytes of a row to the left.
499 </dl><dl> 504 </dl><dl>
500 <dt>Returns:</dt> 505 <dt>Returns:</dt>
501 <dd> 506 <dd>
502 decrypted data (bytes) 507 decrypted data (bytes)
503 </dd> 508 </dd>
509 </dl><dl>
510 <dt>Raises <b>ValueError</b>:</dt>
511 <dd>
512 key size is invalid
513 </dd>
504 </dl><a NAME="AES.encrypt" ID="AES.encrypt"></a> 514 </dl><a NAME="AES.encrypt" ID="AES.encrypt"></a>
505 <h4>AES.encrypt</h4> 515 <h4>AES.encrypt</h4>
506 <b>encrypt</b>(<i>iput, key, size</i>) 516 <b>encrypt</b>(<i>iput, key, size</i>)
507 <p> 517 <p>
508 Public method to encrypt a 128 bit input block against the given key 518 Public method to encrypt a 128 bit input block against the given key
520 </dd> 530 </dd>
521 </dl><dl> 531 </dl><dl>
522 <dt>Returns:</dt> 532 <dt>Returns:</dt>
523 <dd> 533 <dd>
524 encrypted data (bytes) 534 encrypted data (bytes)
535 </dd>
536 </dl><dl>
537 <dt>Raises <b>ValueError</b>:</dt>
538 <dd>
539 key size is invalid
525 </dd> 540 </dd>
526 </dl> 541 </dl>
527 <div align="right"><a href="#top">Up</a></div> 542 <div align="right"><a href="#top">Up</a></div>
528 <hr /><hr /> 543 <hr /><hr />
529 <a NAME="AESModeOfOperation" ID="AESModeOfOperation"></a> 544 <a NAME="AESModeOfOperation" ID="AESModeOfOperation"></a>
586 <h4>AESModeOfOperation.decrypt</h4> 601 <h4>AESModeOfOperation.decrypt</h4>
587 <b>decrypt</b>(<i>cipherIn, originalsize, mode, key, size, IV</i>) 602 <b>decrypt</b>(<i>cipherIn, originalsize, mode, key, size, IV</i>)
588 <p> 603 <p>
589 Public method to perform the decryption operation. 604 Public method to perform the decryption operation.
590 </p><dl> 605 </p><dl>
591 <dt><i>input</i></dt> 606 <dt><i>cipherIn</i></dt>
592 <dd> 607 <dd>
593 data to be encrypted (bytes) 608 data to be decrypted (bytes)
594 </dd><dt><i>originalsize</i></dt> 609 </dd><dt><i>originalsize</i></dt>
595 <dd> 610 <dd>
596 unencrypted string length (required for CBC) 611 unencrypted string length (required for CBC)
597 (integer) 612 (integer)
598 </dd><dt><i>mode</i></dt> 613 </dd><dt><i>mode</i></dt>
611 </dl><dl> 626 </dl><dl>
612 <dt>Returns:</dt> 627 <dt>Returns:</dt>
613 <dd> 628 <dd>
614 decrypted data (bytes) 629 decrypted data (bytes)
615 </dd> 630 </dd>
631 </dl><dl>
632 <dt>Raises <b>ValueError</b>:</dt>
633 <dd>
634 key size is invalid or decrypted data is invalid
635 </dd>
616 </dl><a NAME="AESModeOfOperation.encrypt" ID="AESModeOfOperation.encrypt"></a> 636 </dl><a NAME="AESModeOfOperation.encrypt" ID="AESModeOfOperation.encrypt"></a>
617 <h4>AESModeOfOperation.encrypt</h4> 637 <h4>AESModeOfOperation.encrypt</h4>
618 <b>encrypt</b>(<i>input, mode, key, size, IV</i>) 638 <b>encrypt</b>(<i>input, mode, key, size, IV</i>)
619 <p> 639 <p>
620 Public method to perform the encryption operation. 640 Public method to perform the encryption operation.
638 </dl><dl> 658 </dl><dl>
639 <dt>Returns:</dt> 659 <dt>Returns:</dt>
640 <dd> 660 <dd>
641 tuple with mode of operation, length of the input and 661 tuple with mode of operation, length of the input and
642 the encrypted data (integer, integer, bytes) 662 the encrypted data (integer, integer, bytes)
663 </dd>
664 </dl><dl>
665 <dt>Raises <b>ValueError</b>:</dt>
666 <dd>
667 key size is invalid or decrypted data is invalid
643 </dd> 668 </dd>
644 </dl> 669 </dl>
645 <div align="right"><a href="#top">Up</a></div> 670 <div align="right"><a href="#top">Up</a></div>
646 <hr /><hr /> 671 <hr /><hr />
647 <a NAME="append_PKCS7_padding" ID="append_PKCS7_padding"></a> 672 <a NAME="append_PKCS7_padding" ID="append_PKCS7_padding"></a>
682 </dl><dl> 707 </dl><dl>
683 <dt>Returns:</dt> 708 <dt>Returns:</dt>
684 <dd> 709 <dd>
685 decrypted data (bytes) 710 decrypted data (bytes)
686 </dd> 711 </dd>
687 </dl><dl>
688 <dt>Raises <b>ValueError</b>:</dt>
689 <dd>
690 key size is invalid or decrypted data is invalid
691 </dd>
692 </dl> 712 </dl>
693 <div align="right"><a href="#top">Up</a></div> 713 <div align="right"><a href="#top">Up</a></div>
694 <hr /><hr /> 714 <hr /><hr />
695 <a NAME="encryptData" ID="encryptData"></a> 715 <a NAME="encryptData" ID="encryptData"></a>
696 <h2>encryptData</h2> 716 <h2>encryptData</h2>
729 </dl><dl> 749 </dl><dl>
730 <dt>Returns:</dt> 750 <dt>Returns:</dt>
731 <dd> 751 <dd>
732 stripped data (bytes) 752 stripped data (bytes)
733 </dd> 753 </dd>
754 </dl><dl>
755 <dt>Raises <b>ValueError</b>:</dt>
756 <dd>
757 data padding is invalid
758 </dd>
734 </dl> 759 </dl>
735 <div align="right"><a href="#top">Up</a></div> 760 <div align="right"><a href="#top">Up</a></div>
736 <hr /> 761 <hr />
737 </body></html> 762 </body></html>

eric ide

mercurial