All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qiniu.api.auth.digest.DigestAuth Maven / Gradle / Ivy

There is a newer version: 6.1.9
Show newest version
package com.qiniu.api.auth.digest;

import com.qiniu.api.auth.AuthException;
import com.qiniu.api.config.Config;

public class DigestAuth {

	public static String sign(Mac mac, byte[] data) throws AuthException {
		if (mac == null) {
			mac = new Mac(Config.ACCESS_KEY, Config.SECRET_KEY);
		}
		return mac.sign(data);
	}
	
	
	public static String signWithData(Mac mac, byte[] data) throws AuthException {
		if (mac == null) {
			mac = new Mac(Config.ACCESS_KEY, Config.SECRET_KEY);
		}
		return mac.signWithData(data);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy