Examples of generate160BitKey()


Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

                throw new UnsupportedEncodingException("error while decoding the salt in username token");
            }
        }
        salt[0] = MessageConstants.VALUE_FOR_ENCRYPTION;
        try {
            encSignature = pdk.generate160BitKey(password, iterations, salt);
        } catch (UnsupportedEncodingException ex) {
            log.log(Level.SEVERE, LogStringsMessages.WSS_1425_UNSUPPORTED_ENCODING(), ex);
            throw new UnsupportedEncodingException("error while creating 128 bit key");
        }
        for (int i = 0; i < 16; i++) {
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

        byte[] verifySignature = null;
        if ((purpose == Purpose.DECRYPT)) {
            salt[0] = MessageConstants.VALUE_FOR_ENCRYPTION;
            if (isSymmetric) {
                try {
                    verifySignature = pdk.generate160BitKey(password, iterations, salt);
                } catch (UnsupportedEncodingException ex) {
                    logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
                    throw new XWSSecurityException("error during generating 160 bit key ");
                }
                untBinding.setSecretKey(verifySignature);
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

                SecretKey key = pdk.generate16ByteKeyforEncryption(secretKey);
                sKey = key;
            } else {
                byte[] decSignature = null;
                try {
                    decSignature = pdk.generate160BitKey(password, iterations, salt);
                } catch (UnsupportedEncodingException ex) {
                   logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
                   throw new XWSSecurityException("error during generating 160 bit key ");
                }
                byte[] keyof128Bits = new byte[16];
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

                untBinding.setSecretKey(sKey);
            }
        } else if (purpose == Purpose.VERIFY) {
            salt[0] = MessageConstants.VALUE_FOR_SIGNATURE;
            try {
                verifySignature = pdk.generate160BitKey(password, iterations, salt);
            } catch (UnsupportedEncodingException ex) {
               logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
               throw new XWSSecurityException("error during generating 160 bit key ");
            }
            untBinding.setSecretKey(verifySignature);
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

        } else {
            //handles RequiredDerivedKeys case
            salt[0] = MessageConstants.VALUE_FOR_ENCRYPTION;
            byte[] key = null;
            try {
                key = pdk.generate160BitKey(password, iterations, salt);
            } catch (UnsupportedEncodingException ex) {
                logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
                throw new XWSSecurityException("error during generating 160 bit key ");
            }
            byte[] sKeyof16ByteLength = new byte[16];
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

                }
            }
            //salt[0] = MessageConstants.VALUE_FOR_SIGNATURE;
            salt[0] = (byte) firstByte;
            try {
                macSignature = pdk.generate160BitKey(password, iterations, salt);
            } catch (UnsupportedEncodingException ex) {
                log.log(Level.SEVERE, LogStringsMessages.WSS_1425_UNSUPPORTED_ENCODING(), ex);
                throw new UnsupportedEncodingException("error while creating 160 bit key");
            }
            untBinding.setSecretKey(macSignature);       
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

        byte[] verifySignature = null;
        if ((purpose == Purpose.DECRYPT)) {
            salt[0] = MessageConstants.VALUE_FOR_ENCRYPTION;
            if (isSymmetric) {
                try {
                    verifySignature = pdk.generate160BitKey(password, iterations, salt);
                } catch (UnsupportedEncodingException ex) {
                    logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
                    throw new XWSSecurityException("error during generating 160 bit key ");
                }
                untBinding.setSecretKey(verifySignature);
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

                SecretKey key = pdk.generate16ByteKeyforEncryption(secretKey);
                sKey = key;
            } else {
                byte[] decSignature = null;
                try {
                    decSignature = pdk.generate160BitKey(password, iterations, salt);
                } catch (UnsupportedEncodingException ex) {
                   logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
                   throw new XWSSecurityException("error during generating 160 bit key ");
                }
                byte[] keyof128Bits = new byte[16];
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

                untBinding.setSecretKey(sKey);
            }
        } else if (purpose == Purpose.VERIFY) {
            salt[0] = MessageConstants.VALUE_FOR_SIGNATURE;
            try {
                verifySignature = pdk.generate160BitKey(password, iterations, salt);
            } catch (UnsupportedEncodingException ex) {
               logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
               throw new XWSSecurityException("error during generating 160 bit key ");
            }
            untBinding.setSecretKey(verifySignature);
View Full Code Here

Examples of com.sun.xml.ws.security.impl.PasswordDerivedKey.generate160BitKey()

        } else {
            //handles RequiredDerivedKeys case
            salt[0] = MessageConstants.VALUE_FOR_ENCRYPTION;
            byte[] key = null;
            try {
                key = pdk.generate160BitKey(password, iterations, salt);
            } catch (UnsupportedEncodingException ex) {
                logger.log(Level.SEVERE, LogStringsMessages.WSS_1381_ERROR_GENERATING_160_BITKEY(), ex);
                throw new XWSSecurityException("error during generating 160 bit key ");
            }
            byte[] sKeyof16ByteLength = new byte[16];
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.