com.groupdocs.viewer.handlers
Class FilePathEncryptHandler

java.lang.Object
  extended by com.groupdocs.viewer.handlers.FilePathEncryptHandler

public class FilePathEncryptHandler
extends Object

Author:
Alex Bobkov

Field Summary
static String DELIMINATOR
           
 
Constructor Summary
FilePathEncryptHandler()
           
 
Method Summary
static String decrypt(String value, String key)
          Decrypt file path with sensitive time attribute
static String encrypt(String filePath, String key)
          Encrypt file path
static String encrypt(String filePath, String key, int timeToLive)
          Encrypt file path with sensitive time attribute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELIMINATOR

public static final String DELIMINATOR
See Also:
Constant Field Values
Constructor Detail

FilePathEncryptHandler

public FilePathEncryptHandler()
Method Detail

encrypt

public static String encrypt(String filePath,
                             String key,
                             int timeToLive)
Encrypt file path with sensitive time attribute

Parameters:
filePath - full path to file
key - secret key
timeToLive - time for file expiration in minutes
Returns:
encrypted value

encrypt

public static String encrypt(String filePath,
                             String key)
Encrypt file path

Parameters:
filePath - full path to file
key - secret key
Returns:
encrypted value

decrypt

public static String decrypt(String value,
                             String key)
Decrypt file path with sensitive time attribute

Parameters:
value - encrypted value
key - secret key
Returns:
decrypted value


Copyright © 2014. All rights reserved.