MCPcopy Create free account
hub / github.com/M66B/FairEmail / getIv

Method getIv

app/src/main/java/eu/faircode/email/CloudSync.java:778–784  ·  view source on GitHub ↗
(long revision)

Source from the content-addressed store, hash-verified

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());

Callers 1

_callMethod · 0.95

Calls 1

allocateMethod · 0.80

Tested by

no test coverage detected