org.apache.felix.useradmin.impl
Class Base64Impl

java.lang.Object
  extended by org.apache.felix.useradmin.impl.Base64Impl
All Implemented Interfaces:
Base64

public class Base64Impl
extends Object
implements Base64

Base64 encoding implementation.

Version:
$Rev$ $Date$
See Also:
Base64

Constructor Summary
Base64Impl()
           
 
Method Summary
 Object decrypt(Object val)
          This method is decrypting encoded value with Base64.
 byte[] decryptToByteArray(Object val)
          This method is decrypting encoded value with Base64 to byte[].
 Object encrypt(Object value)
          Encrypt value object must be String or byte array with Base64 algorithm.
 void setCharset(String charset)
          Setting character set.
 boolean verify(Object value, Object encrypted)
          Verifying two values if there are equal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Impl

public Base64Impl()
Method Detail

encrypt

public Object encrypt(Object value)
Description copied from interface: Base64
Encrypt value object must be String or byte array with Base64 algorithm.

Specified by:
encrypt in interface Base64
Parameters:
value - String to be encoded
Returns:
encoded value with Base64
See Also:
Base64.encrypt(java.lang.Object)

decrypt

public Object decrypt(Object val)
Description copied from interface: Base64
This method is decrypting encoded value with Base64.

Specified by:
decrypt in interface Base64
Parameters:
val - encoded value.
Returns:
decrypted value.
See Also:
Base64.decrypt(java.lang.Object)

decryptToByteArray

public byte[] decryptToByteArray(Object val)
Description copied from interface: Base64
This method is decrypting encoded value with Base64 to byte[].

Specified by:
decryptToByteArray in interface Base64
Parameters:
val - encoded value.
Returns:
decrypted value.
See Also:
Base64.decryptToByteArray(Object)

verify

public boolean verify(Object value,
                      Object encrypted)
Description copied from interface: Base64
Verifying two values if there are equal.

Specified by:
verify in interface Base64
Parameters:
value - object to be verified.
encrypted - value.
Returns:
true if those 2 values are equal if not false.
See Also:
Base64.verify(java.lang.Object, java.lang.Object)

setCharset

public void setCharset(String charset)
Description copied from interface: Base64
Setting character set.

Specified by:
setCharset in interface Base64
Parameters:
charset - Character set.
See Also:
Base64.setCharset(java.lang.String)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.