org.exoplatform.services.security.sso.spnego.message
Class AbstractMessagePart
java.lang.Object
org.exoplatform.services.security.sso.spnego.message.AbstractMessagePart
- All Implemented Interfaces:
- MessagePart
- Direct Known Subclasses:
- AbstractSequence, ApplicationConstructedObject, ContextFlags, NegResult, NegTokenSequencePart, OctetString, Oid
public abstract class AbstractMessagePart
- extends Object
- implements MessagePart
- Author:
- Martin Algesten
|
Method Summary |
static void |
arraycopy(byte[] src,
int srcPos,
int[] dest,
int destPos,
int length)
|
static void |
arraycopy(int[] src,
int srcPos,
byte[] dest,
int destPos,
int length)
|
protected int[] |
calculateDerLength(int length)
Calculates the ASN.1 DER represenation of the length given. |
protected int[] |
wrap(int derType,
int[] wrappedData)
Creates a der part of a message with the type first, then der length and
then the actual data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMessagePart
public AbstractMessagePart()
calculateDerLength
protected int[] calculateDerLength(int length)
- Calculates the ASN.1 DER represenation of the length given.
- Parameters:
length - the length.
- Returns:
- if length < 0x80, the length straight off. If more than 0x80,
the first byte is 0x80 | [number of bytes required to represent
length] and then bytes high byte first.
wrap
protected int[] wrap(int derType,
int[] wrappedData)
- Creates a der part of a message with the type first, then der length and
then the actual data.
- Parameters:
derType - the byte identifier of the data type.wrappedData - the data.
- Returns:
- [derType][derLength][data]
arraycopy
public static void arraycopy(byte[] src,
int srcPos,
int[] dest,
int destPos,
int length)
- Parameters:
src - the source bytes.srcPos - the start position in source.dest - the destination.destPos - the start position in destination.length - how many bytes must be copy.
arraycopy
public static void arraycopy(int[] src,
int srcPos,
byte[] dest,
int destPos,
int length)
- Parameters:
src - the source bytes.srcPos - the start position in source.dest - the destination.destPos - the start position in destination.length - how many bytes must be copy.
Copyright © 2009 eXo Platform SAS. All Rights Reserved.