com.alachisoft.ncache.ncactivate.crypto.Crypto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-activate Show documentation
Show all versions of nc-activate Show documentation
internal package of Alachisoft.
/*
* 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