001package org.apache.commons.ssl.org.bouncycastle.asn1.cmp; 002 003import org.apache.commons.ssl.org.bouncycastle.asn1.ASN1Integer; 004import org.apache.commons.ssl.org.bouncycastle.asn1.ASN1Object; 005import org.apache.commons.ssl.org.bouncycastle.asn1.ASN1Primitive; 006import org.apache.commons.ssl.org.bouncycastle.asn1.ASN1Sequence; 007 008public class POPODecKeyRespContent 009 extends ASN1Object 010{ 011 private ASN1Sequence content; 012 013 private POPODecKeyRespContent(ASN1Sequence seq) 014 { 015 content = seq; 016 } 017 018 public static POPODecKeyRespContent getInstance(Object o) 019 { 020 if (o instanceof POPODecKeyRespContent) 021 { 022 return (POPODecKeyRespContent)o; 023 } 024 025 if (o != null) 026 { 027 return new POPODecKeyRespContent(ASN1Sequence.getInstance(o)); 028 } 029 030 return null; 031 } 032 033 public ASN1Integer[] toASN1IntegerArray() 034 { 035 ASN1Integer[] result = new ASN1Integer[content.size()]; 036 037 for (int i = 0; i != result.length; i++) 038 { 039 result[i] = ASN1Integer.getInstance(content.getObjectAt(i)); 040 } 041 042 return result; 043 } 044 045 /** 046 * <pre> 047 * POPODecKeyRespContent ::= SEQUENCE OF INTEGER 048 * </pre> 049 * @return a basic ASN.1 object representation. 050 */ 051 public ASN1Primitive toASN1Primitive() 052 { 053 return content; 054 } 055}