sS sha256(S text) ctex { if (text == null) ret "-"; return bytesToHex(sha256_impl(toUtf8(text))); } sS sha256(byte[] data) { if (data == null) ret "-"; ret bytesToHex(sha256_impl(data)); } static byte[] sha256_impl(byte[] data) ctex { return MessageDigest.getInstance("SHA-256").digest(data); }