iaik.cms
Class CMSVersion

java.lang.Object
  extended by iaik.cms.CMSVersion

public class CMSVersion
extends java.lang.Object

The CMSVersion.

The CMSVersion is defined as ASN.1 Integer: (see RFC 5652):

 
 CMSVersion ::= INTEGER
                     { v0(0), v1(1), v2(2), v3(3), v4(4), v5(5) }
 


Constructor Summary
CMSVersion(int version)
          Creates a CMSVersion from the version number.
 
Method Summary
 void clearEncoded()
          Clears the encoded CMSVersion.
 byte[] getEncoded()
          Returns the DER encoded CMSVersion.
 int getVersion()
          Gets the version.
 ASN1Object toASN1Object()
          Returns this CMSVersion as ASN1Object.
 java.lang.String toString()
          Returns a String representation of the version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMSVersion

public CMSVersion(int version)
Creates a CMSVersion from the version number.

Parameters:
version - the version number
Method Detail

getVersion

public int getVersion()
Gets the version.

Returns:
the version

toASN1Object

public ASN1Object toASN1Object()
Returns this CMSVersion as ASN1Object.

Returns:
this CMSVersion as ASN1Object

getEncoded

public byte[] getEncoded()
Returns the DER encoded CMSVersion.

Returns:
the DER encoded CMSVersion

clearEncoded

public void clearEncoded()
Clears the encoded CMSVersion.
This method maybe called to clear the parsed encoding so that any following call to toASN1Object() or getEncoded() will build the internal ASN.1 object anew.


toString

public java.lang.String toString()
Returns a String representation of the version.

Overrides:
toString in class java.lang.Object
Returns:
the String representation

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC