com.atlassian.bamboo.security
Class EncryptionServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.security.EncryptionServiceImpl
All Implemented Interfaces:
EncryptionService

@ThreadSafe
public class EncryptionServiceImpl
extends java.lang.Object
implements EncryptionService

This class provides a simple string data encrypter


Constructor Summary
EncryptionServiceImpl()
           
 
Method Summary
 java.lang.String decrypt(java.lang.String data)
          Set of complementary methods EncryptionService.encrypt(String) and EncryptionService.decrypt(String) provide means to obfuscate sensitive data.
 java.lang.String encrypt(java.lang.String stringToEncrypt)
          Set of complementary methods EncryptionService.encrypt(String) and EncryptionService.decrypt(String) provide means to obfuscate sensitive data.
 java.lang.String hashPassword(java.lang.String password)
          Provides a hash for the given password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptionServiceImpl

public EncryptionServiceImpl()
                      throws EncryptionException
Throws:
EncryptionException
Method Detail

encrypt

@NotNull
public java.lang.String encrypt(@Nullable
                                        java.lang.String stringToEncrypt)
                         throws EncryptionException
Description copied from interface: EncryptionService
Set of complementary methods EncryptionService.encrypt(String) and EncryptionService.decrypt(String) provide means to obfuscate sensitive data.

Specified by:
encrypt in interface EncryptionService
Parameters:
stringToEncrypt - string to be encrypted
Returns:
encrypted string
Throws:
EncryptionException - when encryption failed

decrypt

@NotNull
public java.lang.String decrypt(@Nullable
                                        java.lang.String data)
                         throws EncryptionException
Description copied from interface: EncryptionService
Set of complementary methods EncryptionService.encrypt(String) and EncryptionService.decrypt(String) provide means to obfuscate sensitive data.

Specified by:
decrypt in interface EncryptionService
Parameters:
data - string to be decrypted
Returns:
decrypted string
Throws:
EncryptionException - when decryption failed

hashPassword

@NotNull
public java.lang.String hashPassword(@NotNull
                                             java.lang.String password)
                              throws EncryptionException
Description copied from interface: EncryptionService
Provides a hash for the given password. This is a copy of a PasswordService#encrypt method which is probably unused at the moment.

Specified by:
hashPassword in interface EncryptionService
Parameters:
password - The unencrypted password.
Returns:
password hash in UTF-8 characters
Throws:
EncryptionException - Failed to encrypt the password


Copyright © 2012 Atlassian. All Rights Reserved.