public class

TlsUtils

extends Object
java.lang.Object
   ↳ org.bouncycastle.crypto.tls.TlsUtils

Class Overview

Some helper fuctions for MicroTLS.

Summary

Public Constructors
TlsUtils()
Protected Methods
static byte[] PRF(byte[] secret, String asciiLabel, byte[] seed, int size)
static void checkVersion(InputStream is, TlsProtocolHandler handler)
static void checkVersion(byte[] readVersion, TlsProtocolHandler handler)
static void readFully(byte[] buf, InputStream is)
static byte[] readOpaque16(InputStream is)
static byte[] readOpaque8(InputStream is)
static int readUint16(InputStream is)
static int readUint24(InputStream is)
static long readUint32(InputStream is)
static short readUint8(InputStream is)
static void writeGMTUnixTime(byte[] buf, int offset)
static void writeOpaque16(byte[] buf, OutputStream os)
static void writeOpaque24(byte[] buf, OutputStream os)
static void writeOpaque8(byte[] buf, OutputStream os)
static void writeUint16(int i, OutputStream os)
static void writeUint16(int i, byte[] buf, int offset)
static void writeUint16Array(int[] uints, OutputStream os)
static void writeUint24(int i, byte[] buf, int offset)
static void writeUint24(int i, OutputStream os)
static void writeUint32(long i, OutputStream os)
static void writeUint32(long i, byte[] buf, int offset)
static void writeUint64(long i, byte[] buf, int offset)
static void writeUint64(long i, OutputStream os)
static void writeUint8(short i, OutputStream os)
static void writeUint8(short i, byte[] buf, int offset)
static void writeUint8Array(short[] uints, OutputStream os)
static void writeVersion(byte[] buf, int offset)
static void writeVersion(OutputStream os)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TlsUtils ()

Protected Methods

protected static byte[] PRF (byte[] secret, String asciiLabel, byte[] seed, int size)

protected static void checkVersion (InputStream is, TlsProtocolHandler handler)

Throws
IOException

protected static void checkVersion (byte[] readVersion, TlsProtocolHandler handler)

Throws
IOException

protected static void readFully (byte[] buf, InputStream is)

Throws
IOException

protected static byte[] readOpaque16 (InputStream is)

Throws
IOException

protected static byte[] readOpaque8 (InputStream is)

Throws
IOException

protected static int readUint16 (InputStream is)

Throws
IOException

protected static int readUint24 (InputStream is)

Throws
IOException

protected static long readUint32 (InputStream is)

Throws
IOException

protected static short readUint8 (InputStream is)

Throws
IOException

protected static void writeGMTUnixTime (byte[] buf, int offset)

protected static void writeOpaque16 (byte[] buf, OutputStream os)

Throws
IOException

protected static void writeOpaque24 (byte[] buf, OutputStream os)

Throws
IOException

protected static void writeOpaque8 (byte[] buf, OutputStream os)

Throws
IOException

protected static void writeUint16 (int i, OutputStream os)

Throws
IOException

protected static void writeUint16 (int i, byte[] buf, int offset)

protected static void writeUint16Array (int[] uints, OutputStream os)

Throws
IOException

protected static void writeUint24 (int i, byte[] buf, int offset)

protected static void writeUint24 (int i, OutputStream os)

Throws
IOException

protected static void writeUint32 (long i, OutputStream os)

Throws
IOException

protected static void writeUint32 (long i, byte[] buf, int offset)

protected static void writeUint64 (long i, byte[] buf, int offset)

protected static void writeUint64 (long i, OutputStream os)

Throws
IOException

protected static void writeUint8 (short i, OutputStream os)

Throws
IOException

protected static void writeUint8 (short i, byte[] buf, int offset)

protected static void writeUint8Array (short[] uints, OutputStream os)

Throws
IOException

protected static void writeVersion (byte[] buf, int offset)

Throws
IOException

protected static void writeVersion (OutputStream os)

Throws
IOException