safedb 디버깅
This commit is contained in:
@@ -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) {
|
if (isRealSafeDB) {
|
||||||
try {
|
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);
|
log.debug("[SafeDBWrapper] real / userId : {}, table : {}, column : {}, data : {}", userId, table, column, data);
|
||||||
return safedb.encrypt(userId, table, column, data.getBytes());
|
return safedb.encrypt(userId, table, column, data.getBytes());
|
||||||
} catch (Exception e) {
|
} 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 {
|
public byte[] decrypt(String userId, String table, String column, String data) throws SafeDBWrapperSdkException {
|
||||||
if (isRealSafeDB) {
|
if (isRealSafeDB) {
|
||||||
try {
|
try {
|
||||||
// return (byte[]) super.methodInvoke("decrypt",
|
log.debug("[SafeDBWrapper] String : {}", data);
|
||||||
// new Class<?>[]{String.class, String.class, String.class, String.class},
|
|
||||||
// new Object[]{userId, table, column, data});
|
|
||||||
byte[] dataBytes = Base64.getDecoder().decode(data);
|
byte[] dataBytes = Base64.getDecoder().decode(data);
|
||||||
|
log.debug("[SafeDBWrapper] Decode data : {}", dataBytes);
|
||||||
return safedb.decrypt(userId, table, column, dataBytes);
|
return safedb.decrypt(userId, table, column, dataBytes);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new SafeDBWrapperException("[SafeDBWrapper] Decrypt error: " + e.getMessage(), e);
|
throw new SafeDBWrapperException("[SafeDBWrapper] Decrypt error: " + e.getMessage(), e);
|
||||||
|
|||||||
Reference in New Issue
Block a user