Back to project page SecNote.
The source code is released under:
Apache License
If you think the Android project SecNote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.baraccasoftware.securenotes.object; // w ww . j a v a2 s . c om import javax.crypto.SecretKey; /** * Created by angelo on 30/12/13. */ public abstract class Encryptor { SecretKey key; public static String password; public static int algorithm = -1; abstract public SecretKey deriveKey(String passpword, byte[] salt); abstract public String encrypt(String plaintext, String password); abstract public String decrypt(String ciphertext, String password); public String getRawKey() { if (key == null) { return null; } return Crypto.toHex(key.getEncoded()); } }