File tree 5 files changed +10
-10
lines changed
src/test/java/com/amazonaws/encryptionsdk
5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 39
39
import java .util .Map ;
40
40
import java .util .concurrent .TimeUnit ;
41
41
42
- import com .amazonaws .encryptionsdk .internal .StaticKeyring ;
42
+ import com .amazonaws .encryptionsdk .internal .TestKeyring ;
43
43
import com .amazonaws .encryptionsdk .keyrings .Keyring ;
44
44
import org .junit .Before ;
45
45
import org .junit .Test ;
@@ -65,7 +65,7 @@ public class AwsCryptoTest {
65
65
@ Before
66
66
public void init () {
67
67
masterKeyProvider = spy (new StaticMasterKey ("testmaterial" ));
68
- keyring = spy (new StaticKeyring ("testmaterial" ));
68
+ keyring = spy (new TestKeyring ("testmaterial" ));
69
69
70
70
encryptionClient_ = new AwsCrypto ();
71
71
encryptionClient_ .setEncryptionAlgorithm (CryptoAlgorithm .ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256 );
Original file line number Diff line number Diff line change 13
13
14
14
package com .amazonaws .encryptionsdk ;
15
15
16
- import com .amazonaws .encryptionsdk .internal .StaticKeyring ;
16
+ import com .amazonaws .encryptionsdk .internal .TestKeyring ;
17
17
import com .amazonaws .encryptionsdk .keyrings .Keyring ;
18
18
import org .junit .jupiter .api .Test ;
19
19
import org .junit .jupiter .api .extension .ExtendWith ;
@@ -52,7 +52,7 @@ void testNeitherCiphertextOrParsedCiphertext() {
52
52
void testKeyringUsesDefaultCmm () {
53
53
54
54
byte [] ciphertext = new AwsCrypto ().encrypt (EncryptRequest .builder ()
55
- .keyring (new StaticKeyring ("keyId" ))
55
+ .keyring (new TestKeyring ("keyId" ))
56
56
.plaintext (new byte []{4 , 5 , 6 })
57
57
.build ()).getResult ();
58
58
Original file line number Diff line number Diff line change 26
26
import java .util .Objects ;
27
27
import java .util .function .Consumer ;
28
28
29
- import com .amazonaws .encryptionsdk .internal .StaticKeyring ;
29
+ import com .amazonaws .encryptionsdk .internal .TestKeyring ;
30
30
import com .amazonaws .encryptionsdk .keyrings .Keyring ;
31
31
import org .junit .Test ;
32
32
45
45
public class DefaultCryptoMaterialsManagerTest {
46
46
private static final MasterKey <?> mk1 = new StaticMasterKey ("mk1" );
47
47
private static final MasterKey <?> mk2 = new StaticMasterKey ("mk2" );
48
- private static final Keyring keyring1 = new StaticKeyring ("keyring1" );
48
+ private static final Keyring keyring1 = new TestKeyring ("keyring1" );
49
49
50
50
@ Test
51
51
public void encrypt_testBasicFunctionalityWithMkp () {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class DecryptionHandlerTest {
39
39
@ Before
40
40
public void init () {
41
41
masterKeyProvider_ = new StaticMasterKey ("testmaterial" );
42
- keyring = new StaticKeyring ("testmaterial" );
42
+ keyring = new TestKeyring ("testmaterial" );
43
43
}
44
44
45
45
@ Test (expected = NullPointerException .class )
Original file line number Diff line number Diff line change 40
40
import static java .util .Objects .requireNonNull ;
41
41
42
42
/**
43
- * Static implementation of the {@link Keyring} interface that should only
43
+ * Implementation of the {@link Keyring} interface that should only
44
44
* used for unit-tests.
45
45
* <p>
46
46
* Contains a statically defined asymmetric key-pair that can be used
50
50
* @author wesleyr
51
51
*/
52
52
@ NotThreadSafe
53
- public class StaticKeyring implements Keyring {
53
+ public class TestKeyring implements Keyring {
54
54
private static final String PROVIDER_ID = "static_provider" ;
55
55
56
56
/**
@@ -89,7 +89,7 @@ public class StaticKeyring implements Keyring {
89
89
* of the encrypted data, and is used to ensure that the header cannot
90
90
* be tempered with.
91
91
*/
92
- public StaticKeyring (@ Nonnull final String keyId ) {
92
+ public TestKeyring (@ Nonnull final String keyId ) {
93
93
this .keyId_ = requireNonNull (keyId );
94
94
95
95
try {
You can’t perform that action at this time.
0 commit comments