Examples of CipherAlgorithm


Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

        setCspName(null);
        setBlockSize(keyData.getBlockSize());

        int keyBits = (int)keyData.getKeyBits();
       
        CipherAlgorithm ca = CipherAlgorithm.fromXmlId(keyData.getCipherAlgorithm().toString(), keyBits);
        setCipherAlgorithm(ca);
        setCipherProvider(ca.provider);

        switch (keyData.getCipherChaining().intValue()) {
        case STCipherChaining.INT_CHAINING_MODE_CBC:
View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

            throw new EncryptedDocumentException("Unable to parse keyData", e);
        }
       
        int keyBits = (int)keyData.getKeyBits();
       
        CipherAlgorithm ca = CipherAlgorithm.fromXmlId(keyData.getCipherAlgorithm().toString(), keyBits);
        setCipherAlgorithm(ca);

        int hashSize = keyData.getHashSize();

        HashAlgorithm ha = HashAlgorithm.fromEcmaId(keyData.getHashAlgorithm().toString());
View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

    Biff8RC4Key(byte[] keyDigest) {
        if (keyDigest.length != KEY_DIGEST_LENGTH) {
            throw new IllegalArgumentException("Expected 5 byte key digest, but got " + HexDump.toHex(keyDigest));
        }

        CipherAlgorithm ca = CipherAlgorithm.rc4;
        _secretKey = new SecretKeySpec(keyDigest, ca.jceId);
    }
View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

        return Arrays.equals(verifierHashPrime, finalVerifierResult);
    }
   
    Cipher getCipher() {
        CipherAlgorithm ca = CipherAlgorithm.rc4;
        Cipher rc4 = CryptoFunctions.getCipher(_secretKey, ca, null, null, Cipher.ENCRYPT_MODE);
        return rc4;
    }
View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

        setCspName(null);
        setBlockSize(keyData.getBlockSize());

        int keyBits = (int)keyData.getKeyBits();
       
        CipherAlgorithm ca = CipherAlgorithm.fromXmlId(keyData.getCipherAlgorithm().toString(), keyBits);
        setCipherAlgorithm(ca);
        setCipherProvider(ca.provider);

        switch (keyData.getCipherChaining().intValue()) {
        case STCipherChaining.INT_CHAINING_MODE_CBC:
View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

            throw new EncryptedDocumentException("Unable to parse keyData", e);
        }
       
        int keyBits = (int)keyData.getKeyBits();
       
        CipherAlgorithm ca = CipherAlgorithm.fromXmlId(keyData.getCipherAlgorithm().toString(), keyBits);
        setCipherAlgorithm(ca);

        int hashSize = keyData.getHashSize();

        HashAlgorithm ha = HashAlgorithm.fromEcmaId(keyData.getHashAlgorithm().toString());
View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

     */
    public boolean verifyPassword(String password) throws GeneralSecurityException {
        AgileEncryptionVerifier ver = builder.getVerifier();
        AgileEncryptionHeader header = builder.getHeader();
        HashAlgorithm hashAlgo = header.getHashAlgorithmEx();
        CipherAlgorithm cipherAlgo = header.getCipherAlgorithm();
        int blockSize = header.getBlockSize();
        int keySize = header.getKeySize()/8;

        byte[] pwHash = hashPassword(password, ver.getHashAlgorithm(), ver.getSalt(), ver.getSpinCount());

View Full Code Here

Examples of org.apache.poi.poifs.crypt.CipherAlgorithm

     */
    public boolean verifyPassword(KeyPair keyPair, X509Certificate x509) throws GeneralSecurityException {
        AgileEncryptionVerifier ver = builder.getVerifier();
        AgileEncryptionHeader header = builder.getHeader();
        HashAlgorithm hashAlgo = header.getHashAlgorithmEx();
        CipherAlgorithm cipherAlgo = header.getCipherAlgorithm();
        int blockSize = header.getBlockSize();
       
        AgileCertificateEntry ace = null;
        for (AgileCertificateEntry aceEntry : ver.getCertificates()) {
            if (x509.equals(aceEntry.x509)) {
View Full Code Here

Examples of org.apache.syncope.common.types.CipherAlgorithm

        if (args.length != 2) {
            usage();
            System.exit(1);
        }

        CipherAlgorithm cipherAlgorithm = null;
        try {
            cipherAlgorithm = CipherAlgorithm.valueOf(args[1]);
        } catch (IllegalArgumentException e) {
            System.err.println("Unsupported algorithm " + args[1]);
            usage();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.