VirgilCardCrypto { public byte[] computeSha512(byte[] data) { return virgilCrypto.computeHash(data); } VirgilCardCrypto();  VirgilCardCrypto(VirgilCrypto virgilCrypto); byte[] exportPublicKey(VirgilPublicKey publicKey); byte[] computeSha512(byte[] data); byte[] generateSignature(byte[] data, VirgilPrivateKey privateKey); VirgilCrypto getVirgilCrypto(); VirgilPublicKey importPublicKey(byte[] data); boolean verifySignature(byte[] signature, byte[] data, VirgilPublicKey publicKey);  }
@Test public void generateSha512() { byte[] hash = this.cardCrypto.computeSha512(TEST_DATA); assertNotNull(hash); assertArrayEquals( Base64.decode( "sjkkPe4LyXDsOl7R9K57Zeu4X3beeV9JmwOvaBUFLMWKeKeMkv25r3YhPS/mQF6d2TWjNGGMxQnH9szJolYZGg==" .getBytes()), hash); }
@Test public void generateSha512_null() { assertThrows(NullArgumentException.class, () -> { this.cardCrypto.computeSha512(null); }); }