com.googlecode.gwt.crypto.bouncycastle.params.KeyParameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gwt-crypto Show documentation
Show all versions of gwt-crypto Show documentation
A partial port of the Bouncycastle J2ME crypto library with
parts taken from GWTx.
The newest version!
package com.googlecode.gwt.crypto.bouncycastle.params;
import com.googlecode.gwt.crypto.bouncycastle.CipherParameters;
import com.googlecode.gwt.crypto.util.Sys;
public class KeyParameter implements CipherParameters {
private byte[] key;
public KeyParameter(byte[] key) {
this(key, 0, key.length);
}
public KeyParameter(byte[] key, int keyOff, int keyLen) {
this.key = new byte[keyLen];
Sys.arraycopy(key, keyOff, this.key, 0, keyLen);
}
public byte[] getKey() {
return key;
}
}