PBEKey
Stay organized with collections
Save and categorize content based on your preferences.
The interface to a PBE key.
Constant Summary
long |
serialVersionUID |
The class fingerprint that is set to indicate serialization
compatibility since J2SE 1.4. |
Inherited Constant Summary
From interface
java.security.Key
long |
serialVersionUID |
The class fingerprint that is set to indicate
serialization compatibility with a previous
version of the class. |
Public Method Summary
abstract
int
|
|
abstract
char[]
|
|
abstract
byte[]
|
getSalt()
Returns the salt or null if not specified.
|
Inherited Method Summary
From interface
java.security.Key
abstract
String
|
getAlgorithm()
Returns the standard algorithm name for this key.
|
abstract
byte[]
|
getEncoded()
Returns the key in its primary encoding format, or null
if this key does not support encoding.
|
abstract
String
|
getFormat()
Returns the name of the primary encoding format of this key,
or null if this key does not support encoding.
|
Constants
public
static
final
long
serialVersionUID
The class fingerprint that is set to indicate serialization
compatibility since J2SE 1.4.
Constant Value:
-1430015993304333921
Public Methods
public
abstract
int
getIterationCount
()
Returns the iteration count or 0 if not specified.
public
abstract
char[]
getPassword
()
Returns the password.
Note: this method should return a copy of the password. It is
the caller's responsibility to zero out the password information after
it is no longer needed.
public
abstract
byte[]
getSalt
()
Returns the salt or null if not specified.
Note: this method should return a copy of the salt. It is
the caller's responsibility to zero out the salt information after
it is no longer needed.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003ePBEKey\u003c/code\u003e interface provides access to the password, salt, and iteration count used in Password-Based Encryption (PBE).\u003c/p\u003e\n"],["\u003cp\u003eIt extends the \u003ccode\u003eSecretKey\u003c/code\u003e interface and includes methods for retrieving PBE-specific parameters.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetPassword()\u003c/code\u003e, \u003ccode\u003egetSalt()\u003c/code\u003e, and \u003ccode\u003egetIterationCount()\u003c/code\u003e methods retrieve the password, salt, and iteration count respectively.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should securely handle the sensitive information returned by these methods, ensuring to zero out the data when no longer needed.\u003c/p\u003e\n"]]],[],null,[]]