我已經創建了一個祕密密鑰,並需要將其存儲在數據庫中,所以我將它轉換爲字符串,之後,我想從數據庫中取回這些密鑰,所以有什麼可能的方式來找到它?執行從字符串鑄造到鍵
KeyGenerator keyGenerator = KeyGenerator.getInstance("RC4");
SecretKey secretKey = keyGenerator.generateKey();
Cipher cipher = Cipher.getInstance("RC4");
String mainKey=secretKey.toString();
String cipherkey=cipher.toString());
你可以存儲它而不轉換爲字符串 – 2014-10-30 11:28:36
你不應該保存你的字符串格式,它也不安全。 – 2014-10-30 11:31:10
MyDog如何在不使用數據類型的情況下保存?如果我保存沒有轉換什麼將是列的數據類型 – 2014-10-30 11:35:17