MCPcopy Create free account
hub / github.com/SeanDragon/protools / toKey

Method toKey

security/src/main/java/pro/tools/security/ToolAES.java:59–64  ·  view source on GitHub ↗

转换密钥 @param key 二进制密钥 @return Key 密钥 @throws Exception

(byte[] key)

Source from the content-addressed store, hash-verified

57 * @throws Exception
58 */
59 private static Key toKey(byte[] key) {
60 // 实例化AES密钥材料
61 SecretKey secretKey = new SecretKeySpec(key, KEY_ALGORITHM);
62
63 return secretKey;
64 }
65
66 /**
67 * 解密

Callers 2

decryptMethod · 0.95
encryptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected