BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.security.Cipher Class Reference

Static Public Member Functions

static byte[] symetricEncrypt (byte[] inpBytes)
 
static byte[] symetricDecrypt (byte[] inpBytes)
 
static byte[] asymetricEncrypt (byte[] inpBytes)
 
static byte[] asymetricDecrypt (byte[] inpBytes) throws Exception
 

Static Public Attributes

static final String SECRET_KEY_FILE = "/WEB-INF/elephant/security/secret.cipher"
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 40 of file Cipher.java.

Member Function Documentation

◆ asymetricDecrypt()

static byte [] org.turro.elephant.impl.security.Cipher.asymetricDecrypt ( byte[]  inpBytes) throws Exception
static

Definition at line 81 of file Cipher.java.

81  {
82  initKeys();
83  KeyPair kp = (KeyPair) getFromFile(new File(ElephantContext.getRealPath(PAIR_KEY_FILE)));
84  return AsymetricCipher.decrypt(inpBytes, kp.getPublic());
85  }
Here is the call graph for this function:

◆ asymetricEncrypt()

static byte [] org.turro.elephant.impl.security.Cipher.asymetricEncrypt ( byte[]  inpBytes)
static

Definition at line 75 of file Cipher.java.

75  {
76  initKeys();
77  KeyPair kp = (KeyPair) getFromFile(new File(ElephantContext.getRealPath(PAIR_KEY_FILE)));
78  return AsymetricCipher.encrypt(inpBytes, kp.getPrivate());
79  }
Here is the call graph for this function:

◆ symetricDecrypt()

static byte [] org.turro.elephant.impl.security.Cipher.symetricDecrypt ( byte[]  inpBytes)
static

Definition at line 69 of file Cipher.java.

69  {
70  initKeys();
71  return SymetricCipher.decrypt(inpBytes, (SecretKey)
72  getFromFile(new File(ElephantContext.getRealPath(SECRET_KEY_FILE))));
73  }
static final String SECRET_KEY_FILE
Definition: Cipher.java:43
Here is the call graph for this function:
Here is the caller graph for this function:

◆ symetricEncrypt()

static byte [] org.turro.elephant.impl.security.Cipher.symetricEncrypt ( byte[]  inpBytes)
static

Definition at line 63 of file Cipher.java.

63  {
64  initKeys();
65  return SymetricCipher.encrypt(inpBytes, (SecretKey)
66  getFromFile(new File(ElephantContext.getRealPath(SECRET_KEY_FILE))));
67  }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ SECRET_KEY_FILE

final String org.turro.elephant.impl.security.Cipher.SECRET_KEY_FILE = "/WEB-INF/elephant/security/secret.cipher"
static

Definition at line 43 of file Cipher.java.


The documentation for this class was generated from the following file: