List of usage examples for java.security AlgorithmParameters getEncoded
public final byte[] getEncoded() throws IOException
From source file:org.alfresco.encryption.DefaultEncryptionUtils.java
/** * {@inheritDoc}//from w w w . ja v a2s . c o m */ @Override public void setRequestAlgorithmParameters(HttpMethod method, AlgorithmParameters params) throws IOException { if (params != null) { method.setRequestHeader(HEADER_ALGORITHM_PARAMETERS, Base64.encodeBytes(params.getEncoded())); } }
From source file:org.alfresco.encryption.DefaultEncryptionUtils.java
/** * Set the algorithm parameters header on the HTTP response * //w ww. java 2 s .co m * @param response HttpServletResponse * @param params AlgorithmParameters * @throws IOException */ protected void setAlgorithmParameters(HttpServletResponse response, AlgorithmParameters params) throws IOException { if (params != null) { response.setHeader(HEADER_ALGORITHM_PARAMETERS, Base64.encodeBytes(params.getEncoded())); } }