Class VOMSACGenerator.RandomContentSigner

  • All Implemented Interfaces:
    org.bouncycastle.operator.ContentSigner
    Enclosing class:
    VOMSACGenerator

    static class VOMSACGenerator.RandomContentSigner
    extends java.lang.Object
    implements org.bouncycastle.operator.ContentSigner
    A ContentSigner implementation that generates random signature bits.

    This is used for testing purposes to create attribute certificates with fake signatures.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.io.ByteArrayOutputStream bos  
      static int SIG_LENGHT
      The length of the randomly generated signature.
      (package private) org.bouncycastle.asn1.x509.AlgorithmIdentifier sigAlgId  
    • Constructor Summary

      Constructors 
      Constructor Description
      RandomContentSigner​(java.lang.String sigAlgName)
      Constructs a RandomContentSigner with the given signature algorithm name.
    • Field Detail

      • SIG_LENGHT

        public static final int SIG_LENGHT
        The length of the randomly generated signature.
        See Also:
        Constant Field Values
      • bos

        java.io.ByteArrayOutputStream bos
      • sigAlgId

        org.bouncycastle.asn1.x509.AlgorithmIdentifier sigAlgId
    • Constructor Detail

      • RandomContentSigner

        public RandomContentSigner​(java.lang.String sigAlgName)
        Constructs a RandomContentSigner with the given signature algorithm name.
        Parameters:
        sigAlgName - the name of the signature algorithm
    • Method Detail

      • getAlgorithmIdentifier

        public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
        Specified by:
        getAlgorithmIdentifier in interface org.bouncycastle.operator.ContentSigner
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Specified by:
        getOutputStream in interface org.bouncycastle.operator.ContentSigner
      • getSignature

        public byte[] getSignature()
        Specified by:
        getSignature in interface org.bouncycastle.operator.ContentSigner