org.sonar.api.config
Class Encryption

java.lang.Object
  extended by org.sonar.api.config.Encryption

public final class Encryption
extends Object

Since:
3.0

Constructor Summary
Encryption(String pathToSecretKey)
           
 
Method Summary
 String decrypt(String encryptedText)
           
 String encrypt(String clearText)
           
 String generateRandomSecretKey()
           
 boolean hasSecretKey()
          Checks the availability of the secret key, that is required to encrypt and decrypt.
 boolean isEncrypted(String value)
           
 String scramble(String clearText)
           
 void setPathToSecretKey(String pathToSecretKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Encryption

public Encryption(@Nullable
                  String pathToSecretKey)
Method Detail

setPathToSecretKey

public void setPathToSecretKey(@Nullable
                               String pathToSecretKey)

hasSecretKey

public boolean hasSecretKey()
Checks the availability of the secret key, that is required to encrypt and decrypt.


isEncrypted

public boolean isEncrypted(String value)

encrypt

public String encrypt(String clearText)

scramble

public String scramble(String clearText)

generateRandomSecretKey

public String generateRandomSecretKey()

decrypt

public String decrypt(String encryptedText)


Copyright © 2009-2014 SonarSource. All Rights Reserved.