safedb 디버깅

This commit is contained in:
Rinjae
2025-09-25 19:12:14 +09:00
parent 41ac107360
commit 3ce690fe47
@@ -86,12 +86,9 @@ public class SafeDBWrapper extends SafeDBBroker {
}
public byte[] encrypt(String userId, String table, String column, String data) throws SafeDBWrapperSdkException {
public byte[] encrypt(String userId, String table, String column, String data) throws SafeDBWrapperSdkException {
if (isRealSafeDB) {
try {
// return (byte[]) super.methodInvoke("encrypt",
// new Class<?>[]{String.class, String.class, String.class, String.class},
// new Object[]{userId, table, column, data});
log.debug("[SafeDBWrapper] real / userId : {}, table : {}, column : {}, data : {}", userId, table, column, data);
return safedb.encrypt(userId, table, column, data.getBytes());
} catch (Exception e) {
@@ -110,10 +107,9 @@ public class SafeDBWrapper extends SafeDBBroker {
public byte[] decrypt(String userId, String table, String column, String data) throws SafeDBWrapperSdkException {
if (isRealSafeDB) {
try {
// return (byte[]) super.methodInvoke("decrypt",
// new Class<?>[]{String.class, String.class, String.class, String.class},
// new Object[]{userId, table, column, data});
log.debug("[SafeDBWrapper] String : {}", data);
byte[] dataBytes = Base64.getDecoder().decode(data);
log.debug("[SafeDBWrapper] Decode data : {}", dataBytes);
return safedb.decrypt(userId, table, column, dataBytes);
} catch (Exception e) {
throw new SafeDBWrapperException("[SafeDBWrapper] Decrypt error: " + e.getMessage(), e);