PluginProbe ʕ •ᴥ•ʔ
Transferito: WP Migration / trunk
Transferito: WP Migration vtrunk
trunk 11.4.0 12.0.0 13.1.0 14.0.0 14.0.11 14.0.7 14.1.0 14.1.1 14.1.2 14.1.3 14.1.4
transferito / vendor / aws / aws-sdk-php / src / Crypto / Cipher / CipherMethod.php
transferito / vendor / aws / aws-sdk-php / src / Crypto / Cipher Last commit date
Cbc.php 11 months ago CipherBuilderTrait.php 11 months ago CipherMethod.php 11 months ago
CipherMethod.php
60 lines
1 <?php
2 namespace Aws\Crypto\Cipher;
3
4 interface CipherMethod
5 {
6 /**
7 * Returns an identifier recognizable by `openssl_*` functions, such as
8 * `aes-256-cbc` or `aes-128-ctr`.
9 *
10 * @return string
11 */
12 public function getOpenSslName();
13
14 /**
15 * Returns an AES recognizable name, such as 'AES/GCM/NoPadding'.
16 *
17 * @return string
18 */
19 public function getAesName();
20
21 /**
22 * Returns the IV that should be used to initialize the next block in
23 * encrypt or decrypt.
24 *
25 * @return string
26 */
27 public function getCurrentIv();
28
29 /**
30 * Indicates whether the cipher method used with this IV requires padding
31 * the final block to make sure the plaintext is evenly divisible by the
32 * block size.
33 *
34 * @return boolean
35 */
36 public function requiresPadding();
37
38 /**
39 * Adjust the return of this::getCurrentIv to reflect a seek performed on
40 * the encryption stream using this IV object.
41 *
42 * @param int $offset
43 * @param int $whence
44 *
45 * @throws LogicException Thrown if the requested seek is not supported by
46 * this IV implementation. For example, a CBC IV
47 * only supports a full rewind ($offset === 0 &&
48 * $whence === SEEK_SET)
49 */
50 public function seek($offset, $whence = SEEK_SET);
51
52 /**
53 * Take account of the last cipher text block to adjust the return of
54 * this::getCurrentIv
55 *
56 * @param string $cipherTextBlock
57 */
58 public function update($cipherTextBlock);
59 }
60