Package edu.uiuc.ncsa.security.util.pkcs
Class Base64String
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.pkcs.Base64String
-
public class Base64String extends Object
Wrapper for Base 64 encoded strings. The assumption is that this is created around a string that is a base 64 encoding of something. If you use the byte constructor,Base64String(byte[])
this will do the base 64 encoding for you. This allows typing so we don't pass b64 encoded strings around by accident. callingtoString
returns the decoded value.Created by Jeff Gaynor
on 10/16/13 at 11:10 AM
-
-
Constructor Summary
Constructors Constructor Description Base64String(byte[] rawbytes)
Base64String(String b64String)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decodeValue()
String
encodeValue(byte[] bytes)
Encode the binary into a base 64 string.String
getValue()
Equivalent totoString
.Returns the base 64 encoded string itself.String
toString()
-
-
-
Constructor Detail
-
Base64String
public Base64String(String b64String)
-
Base64String
public Base64String(byte[] rawbytes)
-
-
Method Detail
-
encodeValue
public String encodeValue(byte[] bytes)
Encode the binary into a base 64 string. You may undo this withdecodeValue()
;- Parameters:
bytes
-- Returns:
-
decodeValue
public byte[] decodeValue()
-
getValue
public String getValue()
Equivalent totoString
.Returns the base 64 encoded string itself.- Returns:
-
-