(long revision)
| 776 | } |
| 777 | |
| 778 | private static byte[] getIv(long revision) { |
| 779 | byte[] iv = ByteBuffer.allocate(12) |
| 780 | .putLong(revision) // 8 bytes |
| 781 | .putInt(0) // 4 bytes |
| 782 | .array(); |
| 783 | return iv; |
| 784 | } |
| 785 | |
| 786 | private static byte[] getAd(String key, long revision) throws NoSuchAlgorithmException { |
| 787 | byte[] k = MessageDigest.getInstance("SHA256").digest(key.getBytes()); |