Class SubjectPublicKeyInfo


  • public final class SubjectPublicKeyInfo
    extends Object
    The class encapsulates the ASN.1 DER encoding/decoding work with the following structure which is a part of X.509 certificate (as specified in RFC 3280 - Internet X.509 Public Key Infrastructure. Certificate and Certificate Revocation List (CRL) Profile. http://www.ietf.org/rfc/rfc3280.txt):
      SubjectPublicKeyInfo  ::=  SEQUENCE  {
          algorithm            AlgorithmIdentifier,
          subjectPublicKey     BIT STRING
      }
     
    • Constructor Detail

      • SubjectPublicKeyInfo

        public SubjectPublicKeyInfo​(AlgorithmIdentifier algID,
                                    byte[] subjectPublicKey)
      • SubjectPublicKeyInfo

        public SubjectPublicKeyInfo​(AlgorithmIdentifier algID,
                                    byte[] subjectPublicKey,
                                    int unused)
    • Method Detail

      • getAlgorithmIdentifier

        public AlgorithmIdentifier getAlgorithmIdentifier()
        Returns the value of algorithmIdentifier field of the structure.
      • getSubjectPublicKey

        public byte[] getSubjectPublicKey()
        Returns the value of subjectPublicKey field of the structure.
      • getEncoded

        public byte[] getEncoded()
        Returns ASN.1 encoded form of this X.509 SubjectPublicKeyInfo value.
      • getPublicKey

        public PublicKey getPublicKey()
        Returns the PublicKey corresponding to this SubjectPublicKeyInfo instance.