本文整理汇总了Java中javax.xml.crypto.dsig.spec.HMACParameterSpec类的典型用法代码示例。如果您正苦于以下问题:Java HMACParameterSpec类的具体用法?Java HMACParameterSpec怎么用?Java HMACParameterSpec使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HMACParameterSpec类属于javax.xml.crypto.dsig.spec包,在下文中一共展示了HMACParameterSpec类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
@Override
void checkParams(SignatureMethodParameterSpec params)
throws InvalidAlgorithmParameterException
{
if (params != null) {
if (!(params instanceof HMACParameterSpec)) {
throw new InvalidAlgorithmParameterException
("params must be of type HMACParameterSpec");
}
outputLength = ((HMACParameterSpec)params).getOutputLength();
outputLengthSet = true;
if (log.isDebugEnabled()) {
log.debug("Setting outputLength from HMACParameterSpec to: " + outputLength);
}
}
}
示例2: checkParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
void checkParams(SignatureMethodParameterSpec params)
throws InvalidAlgorithmParameterException {
if (params != null) {
if (!(params instanceof HMACParameterSpec)) {
throw new InvalidAlgorithmParameterException
("params must be of type HMACParameterSpec");
}
outputLength = ((HMACParameterSpec) params).getOutputLength();
outputLengthSet = true;
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE,
"Setting outputLength from HMACParameterSpec to: "
+ outputLength);
}
} else {
outputLength = -1;
}
}
示例3: checkParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
void checkParams(SignatureMethodParameterSpec params)
throws InvalidAlgorithmParameterException {
if (params != null) {
if (!(params instanceof HMACParameterSpec)) {
throw new InvalidAlgorithmParameterException
("params must be of type HMACParameterSpec");
}
outputLength = ((HMACParameterSpec) params).getOutputLength();
outputLengthSet = true;
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE,
"Setting outputLength from HMACParameterSpec to: "
+ outputLength);
}
}
}
示例4: checkParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
void checkParams(SignatureMethodParameterSpec params)
throws InvalidAlgorithmParameterException
{
if (params != null) {
if (!(params instanceof HMACParameterSpec)) {
throw new InvalidAlgorithmParameterException
("params must be of type HMACParameterSpec");
}
outputLength = ((HMACParameterSpec)params).getOutputLength();
outputLengthSet = true;
if (log.isLoggable(java.util.logging.Level.FINE)) {
log.log(java.util.logging.Level.FINE, "Setting outputLength from HMACParameterSpec to: " + outputLength);
}
}
}
示例5: unmarshalParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
throws MarshalException
{
outputLength = Integer.valueOf(paramsElem.getFirstChild().getNodeValue()).intValue();
outputLengthSet = true;
if (log.isLoggable(java.util.logging.Level.FINE)) {
log.log(java.util.logging.Level.FINE, "unmarshalled outputLength: " + outputLength);
}
return new HMACParameterSpec(outputLength);
}
示例6: paramsEqual
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
boolean paramsEqual(AlgorithmParameterSpec spec) {
if (getParameterSpec() == spec) {
return true;
}
if (!(spec instanceof HMACParameterSpec)) {
return false;
}
HMACParameterSpec ospec = (HMACParameterSpec)spec;
return (outputLength == ospec.getOutputLength());
}
示例7: unmarshalParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
@Override
SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
throws MarshalException
{
outputLength = Integer.parseInt(textOfNode(paramsElem));
outputLengthSet = true;
if (log.isDebugEnabled()) {
log.debug("unmarshalled outputLength: " + outputLength);
}
return new HMACParameterSpec(outputLength);
}
示例8: paramsEqual
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
@Override
boolean paramsEqual(AlgorithmParameterSpec spec) {
if (getParameterSpec() == spec) {
return true;
}
if (!(spec instanceof HMACParameterSpec)) {
return false;
}
HMACParameterSpec ospec = (HMACParameterSpec)spec;
return outputLength == ospec.getOutputLength();
}
示例9: unmarshalParams
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
throws MarshalException {
outputLength = new Integer
(paramsElem.getFirstChild().getNodeValue()).intValue();
outputLengthSet = true;
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE, "unmarshalled outputLength: " + outputLength);
}
return new HMACParameterSpec(outputLength);
}
示例10: paramsEqual
import javax.xml.crypto.dsig.spec.HMACParameterSpec; //导入依赖的package包/类
boolean paramsEqual(AlgorithmParameterSpec spec) {
if (getParameterSpec() == spec) {
return true;
}
if (!(spec instanceof HMACParameterSpec)) {
return false;
}
HMACParameterSpec ospec = (HMACParameterSpec) spec;
return (outputLength == ospec.getOutputLength());
}