public static Long parseAccountId(String account) { if (account == null) { return null; } account = account.toUpperCase(); if (account.startsWith("NHZ-")) { return zeroToNull(Crypto.rsDecode(account.substring(4))); } else { return parseUnsignedLong(account); } }
public static String rsAccount(Long accountId) { return "NHZ-" + Crypto.rsEncode(nullToZero(accountId)); }