Code example for X509Certificate

Methods: getEncoded, getPublicKey, verify

0
        private boolean modifiedFormat;
        private boolean modifiedEncoding;
        private byte[] encoding;
         
        public MyModifiablePublicKey(PublicKey k) {
            super(); 
            this.key = k;
        } 
 
        public String getAlgorithm() {
            if (modifiedAlgo) {
                return algo;
            } else { 
                return key.getAlgorithm();
            } 
        } 
 
        public String getFormat() {
            if (modifiedFormat) {
                return this.format;
            } else { 
                return key.getFormat();
            } 
             
        } 
 
        public byte[] getEncoded() { 
            if (modifiedEncoding) {
                return this.encoding;
            } else { 
                return key.getEncoded();
            } 
             
        } 
 
        public long getSerVerUID() { 
            return key.serialVersionUID;
        } 
         
        public void setAlgorithm(String myAlgo) {
            modifiedAlgo = true;
            this.algo = myAlgo;
        } 
         
        public void setFormat(String myFormat) {