use of tech.pegasys.signers.secp256k1.EthPublicKeyUtils in project signers by ConsenSys.
the class FileBasedTomlLoadingAcceptanceTest method validFileBasedTomlFileWithMultineLinePasswordFileProducesSignerWhichReportsMatchingAddress.
@Test
void validFileBasedTomlFileWithMultineLinePasswordFileProducesSignerWhichReportsMatchingAddress(@TempDir Path tomlDirectory) throws URISyntaxException, IOException {
final Path passwordFile = Files.writeString(tomlDirectory.resolve("password.txt"), String.format("password%nsecond line%n"));
createFileBasedTomlFileAt(tomlDirectory.resolve(PUBLIC_KEY_HEX_STRING + ".toml").toAbsolutePath(), new File(Resources.getResource("secp256k1/UTC--2019-12-05T05-17-11.151993000Z--a01f618424b0113a9cebdc6cb66ca5b48e9120c5.key").toURI()).getAbsolutePath(), passwordFile.toString());
setup(tomlDirectory);
assertThat(signerProvider.availablePublicKeys(PublicKeySignerIdentifier::new).stream().map(EthPublicKeyUtils::toHexString)).containsOnly("0x" + PUBLIC_KEY_HEX_STRING);
}
Aggregations