diff options
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/EncryptionUtil.java')
-rw-r--r-- | platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/EncryptionUtil.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/EncryptionUtil.java b/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/EncryptionUtil.java index 01fef01cecb1..7bbb8bc80789 100644 --- a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/EncryptionUtil.java +++ b/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/EncryptionUtil.java @@ -15,6 +15,8 @@ */ package com.intellij.ide.passwordSafe.impl.providers; +import org.jetbrains.annotations.NotNull; + import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; @@ -115,7 +117,7 @@ public class EncryptionUtil { * @param rawKey the raw key to encrypt * @return the encrypted key */ - public static byte[] encryptKey(byte[] password, byte[] rawKey) { + public static byte[] encryptKey(@NotNull byte[] password, byte[] rawKey) { try { Cipher c = Cipher.getInstance(ENCRYPT_KEY_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(password, SECRET_KEY_ALGORITHM), CBC_SALT_KEY); @@ -130,12 +132,12 @@ public class EncryptionUtil { * Create encrypted db key * * @param password the password to protect the key - * @param requester the requester for the key - * @param key the key within requester + * @param requestor the requestor for the key + * @param key the key within requestor * @return the key to use in the database */ - public static byte[] dbKey(byte[] password, Class requester, String key) { - return encryptKey(password, rawKey(requester, key)); + public static byte[] dbKey(@NotNull byte[] password, Class requestor, String key) { + return encryptKey(password, rawKey(requestor, key)); } |