File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/test/java/com/pusher/client/crypto/nacl Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ public class SecretBoxOpenerTest {
1111
1212 byte [] key = Base64 .decode ("6071zp2l/GPnDPDXNWTJDHyIZ8pZMvQrYsa4xuTKK2c=" );
1313
14- byte [] nonce = Base64 .decode ("xsbOS0KylAV2ziTDHrP/7rSFqpCOah3p" );
1514 byte [] cipher = Base64 .decode ("tvttPE2PRQp0bWDmaPyiEU8YJGztmTvTN77OoPwftTNTdDgJXwxHQPE=" );
15+ byte [] nonce = Base64 .decode ("xsbOS0KylAV2ziTDHrP/7rSFqpCOah3p" );
1616
1717 SecretBoxOpener subject ;
1818
@@ -35,4 +35,11 @@ public void openFailsForTamperedCipher() {
3535
3636 subject .open (tamperedCipher , nonce );
3737 }
38+
39+ @ Test (expected = NullPointerException .class )
40+ public void openFailsAfterClearKey () {
41+ subject .clearKey ();
42+
43+ subject .open (cipher , nonce );
44+ }
3845}
You can’t perform that action at this time.
0 commit comments