Error message

User warning: The following module is missing from the file system: fast_404. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /mnt/www/html/ooyala/docroot/includes/bootstrap.inc).

Código de firma de muestra (Java)

A continuación se incluye código de muestra Java para generar firmas:

import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Vector;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.net.URLEncoder;
import java.io.IOException;

import sun.misc.BASE64Encoder;

public class Signature {
    
    private concatenateParams(HashMap<String, String> parameters, String separator) {
        Vector<String> keys = new Vector<String>(parameters.keySet());
        Collections.sort(keys);
        
        String string = ""; 
        for (Enumeration<String> e = keys.elements(); e.hasMoreElements();) {
            String key    = (String)e.nextElement();
            String value  = (String)parameters.get(key);
            if (!string.isEmpty())
                string += separator;
            string += key + "=" + value;
        }
        return string;
    }

    public String generateSignature(String secretKey, String HTTPMethod, String requestPath, HashMap<String, String> parameters, String   requestBody) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        String stringToSign = secretKey + HTTPMethod + requestPath;
        stringToSign += concatenateParams(parameters, "");
        stringToSign += requestBody;
        MessageDigest digestProvider = MessageDigest.getInstance("SHA-256");
        digestProvider.reset();
        
        byte[] digest = digestProvider.digest(stringToSign.getBytes());
        BASE64Encoder base64Encoder = new BASE64Encoder();
        String signedInput = base64Encoder.encode(digest);
        return URLEncoder.encode(signedInput.substring(0, 43), "US-ASCII");
    }

}