mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 18:59:39 +02:00
Switch default S2K for secret key protection over to use SHA256 and add documentation
This commit is contained in:
parent
251bbaeaa7
commit
15046cdc32
2 changed files with 77 additions and 4 deletions
|
@ -0,0 +1,20 @@
|
|||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.key.protection;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.pgpainless.algorithm.HashAlgorithm;
|
||||
import org.pgpainless.algorithm.SymmetricKeyAlgorithm;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class InvalidProtectionSettingsTest {
|
||||
|
||||
@Test
|
||||
public void unencryptedKeyRingProtectionSettingsThrows() {
|
||||
assertThrows(IllegalArgumentException.class, () ->
|
||||
new KeyRingProtectionSettings(SymmetricKeyAlgorithm.NULL, HashAlgorithm.SHA256, 0x60));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue