mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-06-17 17:10:26 +08:00
fix:IdentifyManager sqlite重写
todo: 更新identity中的lock与unlock
This commit is contained in:
@@ -11,7 +11,13 @@ import packet.Data;
|
||||
import packet.Interest;
|
||||
import packet.MINPacket;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
import java.lang.reflect.Array;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.util.IdentityHashMap;
|
||||
|
||||
/*
|
||||
@@ -68,6 +74,18 @@ public class KeyChain {
|
||||
identity.unLock(passwd, identifyManager.getPrivateKeyEncryptionAlgorithm());
|
||||
} catch (IdentityException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvalidKeyException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchPaddingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (BadPaddingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchProviderException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalBlockSizeException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +124,6 @@ public class KeyChain {
|
||||
}
|
||||
|
||||
|
||||
//TODO: packet类暂未完成
|
||||
private byte[] getIdentifierAndReadOnlyValueFromPacket(MINPacket packet) throws Exception{
|
||||
Block iBlock = new SelfEncodingBase().selfWireEncode(packet.identifierField);
|
||||
Block rBlock = new SelfEncodingBase().selfWireEncode(packet.readOnlyField);
|
||||
|
||||
Reference in New Issue
Block a user