public byte[] verifyAuthenticate(byte[] seed, byte[] result) throws RdaException {
        final SecureMessaging sm = new TDEASecureMessaging(seed, 0, 16, null);

        final byte[] calculatedMac = sm.mac( m -> m.update(result, 0, 32));
        if (!CryptoUtils.compare(calculatedMac, result, 32)) {
            throw new RdaException(RdaError.AUTHENTICATE, "Invalid MAC");
        }

        return sm.decrypt(false, false, result, 0, 32);
    }
@Test
    public void shouldVerifyAuthenticate() throws Exception {
        final CardVerifier verifier = verifier(null, null);
        final byte[] seed = Hex.decode("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
        final byte[] result = Hex.decode(
                "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"
        );

        assertEquals("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS",
                Hex.toHexString(verifier.verifyAuthenticate(seed, result))
        );

    }