public class JavaUtils extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
convertDsaASN1toXMLDSIG(byte[] asn1Bytes,
int size)
Converts an ASN.1 DSA value to a XML Signature DSA Value.
|
static byte[] |
convertDsaXMLDSIGtoASN1(byte[] xmldsigBytes,
int size)
Converts an XML Signature DSA Value to a ASN.1 DSA value.
|
static byte[] |
getBytesFromFile(String fileName)
Method getBytesFromFile
|
static byte[] |
getBytesFromStream(InputStream inputStream)
This method reads all bytes from the given InputStream till EOF and
returns them as a byte array.
|
static void |
writeBytesToFilename(String filename,
byte[] bytes)
Method writeBytesToFilename
|
public static byte[] getBytesFromFile(String fileName) throws FileNotFoundException, IOException
fileName
- FileNotFoundException
IOException
public static void writeBytesToFilename(String filename, byte[] bytes)
filename
- bytes
- public static byte[] getBytesFromStream(InputStream inputStream) throws IOException
inputStream
- FileNotFoundException
IOException
public static byte[] convertDsaASN1toXMLDSIG(byte[] asn1Bytes, int size) throws IOException
asn1Bytes
- the ASN.1 encoded bytessize
- size of r and s in bytesIOException
- if the bytes are not encoded correctlypublic static byte[] convertDsaXMLDSIGtoASN1(byte[] xmldsigBytes, int size) throws IOException
xmldsigBytes
- the XML Signature encoded bytessize
- size of r and s in bytesIOException
- if the bytes are not encoded correctlyCopyright © 2000–2017 The Apache Software Foundation. All rights reserved.