src/java.base/share/classes/com/sun/crypto/provider/GCMParameters.java

Print this page
rev 10526 : 8038277: Improve the bootstrap performance of cacerts keystore (core and security)
Contributed-by: Otavio Santana <otaviojava@java.net>


 123         bytes.putInteger(tLen);
 124         out.write(DerValue.tag_Sequence, bytes);
 125         return out.toByteArray();
 126     }
 127 
 128     protected byte[] engineGetEncoded(String encodingMethod)
 129         throws IOException {
 130         return engineGetEncoded();
 131     }
 132 
 133     /*
 134      * Returns a formatted string describing the parameters.
 135      */
 136     protected String engineToString() {
 137         String LINE_SEP = System.getProperty("line.separator");
 138         HexDumpEncoder encoder = new HexDumpEncoder();
 139         StringBuilder sb
 140             = new StringBuilder(LINE_SEP + "    iv:" + LINE_SEP + "["
 141                 + encoder.encodeBuffer(iv) + "]");
 142 
 143         sb.append(LINE_SEP + "tLen(bits):" + LINE_SEP + tLen*8 + LINE_SEP);

 144         return sb.toString();
 145     }
 146 }


 123         bytes.putInteger(tLen);
 124         out.write(DerValue.tag_Sequence, bytes);
 125         return out.toByteArray();
 126     }
 127 
 128     protected byte[] engineGetEncoded(String encodingMethod)
 129         throws IOException {
 130         return engineGetEncoded();
 131     }
 132 
 133     /*
 134      * Returns a formatted string describing the parameters.
 135      */
 136     protected String engineToString() {
 137         String LINE_SEP = System.getProperty("line.separator");
 138         HexDumpEncoder encoder = new HexDumpEncoder();
 139         StringBuilder sb
 140             = new StringBuilder(LINE_SEP + "    iv:" + LINE_SEP + "["
 141                 + encoder.encodeBuffer(iv) + "]");
 142 
 143         sb.append(LINE_SEP).append("tLen(bits):").append(LINE_SEP)
 144         .append(tLen * 8).append(LINE_SEP);
 145         return sb.toString();
 146     }
 147 }