Package org.kapott.cryptalgs

Examples of org.kapott.cryptalgs.SignatureParamSpec


           
            // System.out.println("hashdata: "+HBCIUtils.data2hex(retArray));
           
            // hash-verfahren h�ngt von rdh-profil ab
            MessageDigest      dig;
            SignatureParamSpec hashSpec=((AbstractRDHPassport)(passport)).getSignatureParamSpec();
            String             provider=hashSpec.getProvider();
            if (provider!=null) {
                dig=MessageDigest.getInstance(hashSpec.getHashAlg(), provider);
            } else {
                dig=MessageDigest.getInstance(hashSpec.getHashAlg());
            }
            return dig.digest(retArray);
        } catch (Exception e) {
            throw new HBCI_Exception("*** error while calculating hash value",e);
        }
View Full Code Here


            throw new HBCI_Exception("*** dont know which hash instance to use for profile rdh-"+profile);
        }

        HBCIUtils.log("using hash instance "+hashalg+"/"+hashprovider,HBCIUtils.LOG_DEBUG2);
       
        return new SignatureParamSpec(hashalg, hashprovider);
    }
View Full Code Here

    @Override
    public byte[] hash(byte[] data) {
        data = super.hash(data);
       
        SignatureParamSpec sps = getSignatureParamSpec();
        MessageDigest dig;
        try {
            dig = MessageDigest.getInstance(sps.getHashAlg(), sps.getProvider());
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        } catch (NoSuchProviderException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

TOP

Related Classes of org.kapott.cryptalgs.SignatureParamSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.