public class EncryptedAuthCredentialStore implements IAuthCredentialStore
Class EncryptedAuthCredentialStore. Provides encryptedauthcredentialstore functionality for the Hytale server.
java.lang.Object > EncryptedAuthCredentialStore
Field Summary
tokens
private
OAuthTokens
tokens
Field tokens.
profile
private
UUID
profile
Field profile.
hardwareId
final
UUID
hardwareId
Field hardwareId.
factory
final
SecretKeyFactory
factory
Field factory.
spec
final
PBEKeySpec
spec
Field spec.
tmp
final
SecretKey
tmp
Field tmp.
encrypted
final
byte[]
encrypted
Field encrypted.
decrypted
final
byte[]
decrypted
Field decrypted.
doc
final
BsonDocument
doc
Field doc.
stored
final
StoredCredentials
stored
Field stored.
plaintext
final
byte[]
plaintext
Field plaintext.
iv
final
byte[]
iv
Field iv.
cipher
final
Cipher
cipher
Field cipher.
ciphertext
final
byte[]
ciphertext
Field ciphertext.
result
final
ByteBuffer
result
Field result.
buffer
final
ByteBuffer
buffer
Field buffer.
Method Detail
EncryptedAuthCredentialStore
public
public
EncryptedAuthCredentialStore
(@Nonnull final Path path)
Method EncryptedAuthCredentialStore.
- Parameters:
@Nonnull final Pathpath
deriveKey
static
SecretKey
deriveKey
()
Method deriveKey.
PBEKeySpec
public
new
PBEKeySpec
(hardwareId.toString()
Method PBEKeySpec.
- Parameters:
hardwareId.toString(hardwareId.toString(
SecretKeySpec
public
new
SecretKeySpec
(tmp.getEncoded()
Method SecretKeySpec.
- Parameters:
tmp.getEncoded(tmp.getEncoded(
load
private
void
load
()
Method load.
save
private
void
save
()
Method save.
encrypt
private
byte[]
encrypt
(@Nonnull final byte[] plaintext)
Method encrypt.
- Parameters:
@Nonnull final byte[]plaintext
SecureRandom
public
new
SecureRandom
()
Method SecureRandom.
GCMParameterSpec
public
new
GCMParameterSpec
(128, iv)
Method GCMParameterSpec.
- Parameters:
128128iviv
decrypt
private
byte[]
decrypt
(@Nonnull final byte[] encrypted)
Method decrypt.
- Parameters:
@Nonnull final byte[]encrypted
setTokens
public
void
setTokens
(@Nonnull final OAuthTokens tokens)
Method setTokens.
- Parameters:
@Nonnull final OAuthTokenstokens
getTokens
public
OAuthTokens
getTokens
()
Method getTokens.
setProfile
public
void
setProfile
(@Nullable final UUID uuid)
Method setProfile.
- Parameters:
@Nullable final UUIDuuid
getProfile
public
UUID
getProfile
()
Method getProfile.
clear
public
void
clear
()
Method clear.