/*
 * @(#)CryptoTools.java
 *
 * Copyright (c) 2002-2003 JSCAPE
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JSCAPE. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JSCAPE.
 */

package com.jscape.crypto;

/**
 * A tool-set for algorithm support.
 *
 * @author Alex Usun
 */
public class CryptoTools {

    /**
     * Cyclically rotates the specified value to the left.
     *
     * @param value  target value
     * @param offset offset
     *
     * @return rotated value.
     */
    public static int rotateLeft(int value, int offset) {
        int from = 32;
        return ((value << offset) | (value >>> (from - offset)));
    }

    /**
     * Private constructor to avoid unnecessary instantiation.
     */
    private CryptoTools() {
        // empty
    }
}

