aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/core/src/main/java/org/spongycastle/pqc/crypto/MessageEncryptor.java
blob: 4d5ea6b28f105d602da25ebb7142a2e5dd2c4072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.spongycastle.pqc.crypto;


import org.spongycastle.crypto.CipherParameters;

public interface MessageEncryptor
{

    /**
     *
     * @param forEncrypting true if we are encrypting a signature, false
     * otherwise.
     * @param param key parameters for encryption or decryption.
     */
    public void init(boolean forEncrypting, CipherParameters param);

    /**
     *
     * @param message the message to be signed.
     * @throws Exception 
     */
    public byte[] messageEncrypt(byte[] message) throws Exception;

    /**
     *
     * @param cipher the cipher text of the message
     * @throws Exception 
     */
    public byte[] messageDecrypt(byte[] cipher) throws Exception;
}