зеркало из https://github.com/mozilla/pjs.git
When unwrapping a symkey, specify a usage. This is to conform
to NSS's api.
This commit is contained in:
Родитель
9ac6155c8f
Коммит
372d9854a0
|
@ -96,9 +96,14 @@ public interface KeyWrapper {
|
||||||
* @param keyLength The expected length of the key in bytes. This is
|
* @param keyLength The expected length of the key in bytes. This is
|
||||||
* only used for variable-length keys (RC4) and non-padding
|
* only used for variable-length keys (RC4) and non-padding
|
||||||
* algorithms. Otherwise, it can be set to anything(like 0).
|
* algorithms. Otherwise, it can be set to anything(like 0).
|
||||||
|
* @param usage The operation the key will be used for after it is
|
||||||
|
* unwrapped. You have to specify this so that the key can be properly
|
||||||
|
* marked with the operation it supports. Some PKCS #11 tokens require
|
||||||
|
* that a key be marked for an operation before it can perform that
|
||||||
|
* operation.
|
||||||
*/
|
*/
|
||||||
public SymmetricKey unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type,
|
public SymmetricKey unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type,
|
||||||
int keyLength)
|
SymmetricKey.Usage usage, int keyLength)
|
||||||
throws TokenException, IllegalStateException,
|
throws TokenException, IllegalStateException,
|
||||||
InvalidAlgorithmParameterException;
|
InvalidAlgorithmParameterException;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче