mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
test(paymentcryptography): the TR-34 codec answers the standard's own vectors (#9079)
This commit is contained in:
1 parent
dc97ce5cb1
commit
42707716cd
5 files changed
+169
-2
No files matched your search
@@ -680,8 +680,13 @@ public final class Tr34 {
|
||||
return new Recovered(HEX_UPPER.formatHex(key), header);
|
||||
}
|
||||
|
||||
/** The SHA-256 digest of the given bytes. */
|
||||
private static byte[] digest(byte[] data) {
|
||||
/**
|
||||
* The SHA-256 digest of the given bytes.
|
||||
*
|
||||
* <p>The digest is not private, so the vector test can check the samples it reads
|
||||
* against the digests the standard published with them.
|
||||
*/
|
||||
static byte[] digest(byte[] data) {
|
||||
try {
|
||||
return MessageDigest.getInstance("SHA-256").digest(data);
|
||||
} catch (GeneralSecurityException e) {
|
||||
|
||||
Reference in new issue
Block a user