open-keychain/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/AppSettings.java

95 lines
2.6 KiB
Java
Raw Normal View History

/*
* Copyright (C) 2013 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2013-09-15 07:52:05 -04:00
package org.sufficientlysecure.keychain.service.remote;
2013-09-06 13:06:17 -04:00
import org.spongycastle.bcpg.HashAlgorithmTags;
import org.spongycastle.openpgp.PGPEncryptedData;
import org.sufficientlysecure.keychain.Id;
public class AppSettings {
2014-03-13 13:50:45 -04:00
private String mPackageName;
private byte[] mPackageSignature;
private long mKeyId = Id.key.none;
private int mEncryptionAlgorithm;
private int mHashAlgorithm;
private int mCompression;
public AppSettings() {
}
public AppSettings(String packageName, byte[] packageSignature) {
super();
2014-03-13 13:50:45 -04:00
this.mPackageName = packageName;
this.mPackageSignature = packageSignature;
2013-09-06 12:54:55 -04:00
// defaults:
2014-03-13 13:50:45 -04:00
this.mEncryptionAlgorithm = PGPEncryptedData.AES_256;
this.mHashAlgorithm = HashAlgorithmTags.SHA512;
this.mCompression = Id.choice.compression.zlib;
}
public String getPackageName() {
2014-03-13 13:50:45 -04:00
return mPackageName;
}
public void setPackageName(String packageName) {
2014-03-13 13:50:45 -04:00
this.mPackageName = packageName;
}
public byte[] getPackageSignature() {
2014-03-13 13:50:45 -04:00
return mPackageSignature;
}
public void setPackageSignature(byte[] packageSignature) {
2014-03-13 13:50:45 -04:00
this.mPackageSignature = packageSignature;
}
public long getKeyId() {
2014-03-13 13:50:45 -04:00
return mKeyId;
}
public void setKeyId(long scretKeyId) {
2014-03-13 13:50:45 -04:00
this.mKeyId = scretKeyId;
}
public int getEncryptionAlgorithm() {
2014-03-13 13:50:45 -04:00
return mEncryptionAlgorithm;
}
public void setEncryptionAlgorithm(int encryptionAlgorithm) {
2014-03-13 13:50:45 -04:00
this.mEncryptionAlgorithm = encryptionAlgorithm;
}
public int getHashAlgorithm() {
2014-03-13 13:50:45 -04:00
return mHashAlgorithm;
}
public void setHashAlgorithm(int hashAlgorithm) {
2014-03-13 13:50:45 -04:00
this.mHashAlgorithm = hashAlgorithm;
}
public int getCompression() {
2014-03-13 13:50:45 -04:00
return mCompression;
}
public void setCompression(int compression) {
2014-03-13 13:50:45 -04:00
this.mCompression = compression;
}
}