All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alachisoft.ncache.ncactivate.crypto.Crypto Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
/*
 * Crypto.java
 *
 * Created on October 7, 2006, 12:18 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package com.alachisoft.ncache.ncactivate.crypto;

import com.alachisoft.ncache.ncactivate.utils.StringRef;

/**
 * Encryption specific functions.
 *
 * @author Administrator
 */
public class Crypto {

    /**
     * Creates a new instance of Crypto
     */
    public Crypto() {
    }

    public static String Decode(String strCode) {
        StringRef str = new StringRef();
        int dlen = Impl.decode(strCode, str);
        return str.strData;
    }

    public static int Decode(String strCode, byte[] lpArr) {
        return Impl.decode(strCode, lpArr);
    }

    public static String Encode(String strText) {
        StringRef str = new StringRef();
        int dlen = Impl.encode(strText, str);
        return str.strData;
    }

    public static String Encode(byte[] lpArr, int ncount) {
        String str = new String();
        int dlen = Impl.encode(lpArr, ncount, str);
        return str;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy