当前位置: 首页>>代码示例>>Java>>正文


Java HMACParameterSpec类代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:17,代码来源:DOMHMACSignatureMethod.java

示例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;
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:19,代码来源:DOMHMACSignatureMethod.java

示例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);
        }
    }
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:17,代码来源:DOMHMACSignatureMethod.java

示例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);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:DOMHMACSignatureMethod.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:DOMHMACSignatureMethod.java

示例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());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:DOMHMACSignatureMethod.java

示例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);
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:12,代码来源:DOMHMACSignatureMethod.java

示例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();
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:13,代码来源:DOMHMACSignatureMethod.java

示例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);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:11,代码来源:DOMHMACSignatureMethod.java

示例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());
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:12,代码来源:DOMHMACSignatureMethod.java


注:本文中的javax.xml.crypto.dsig.spec.HMACParameterSpec类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。