mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-09 18:29:48 +02:00
Wip
This commit is contained in:
parent
8184c30617
commit
a7f02d58cc
18 changed files with 442 additions and 115 deletions
|
@ -7,10 +7,12 @@ package sop;
|
|||
import sop.operation.Armor;
|
||||
import sop.operation.Dearmor;
|
||||
import sop.operation.Decrypt;
|
||||
import sop.operation.InlineDetach;
|
||||
import sop.operation.Encrypt;
|
||||
import sop.operation.ExtractCert;
|
||||
import sop.operation.GenerateKey;
|
||||
import sop.operation.InlineDetach;
|
||||
import sop.operation.InlineSign;
|
||||
import sop.operation.InlineVerify;
|
||||
import sop.operation.Sign;
|
||||
import sop.operation.Verify;
|
||||
import sop.operation.Version;
|
||||
|
@ -91,5 +93,9 @@ public interface SOP {
|
|||
*/
|
||||
Dearmor dearmor();
|
||||
|
||||
InlineDetach detachInbandSignatureAndMessage();
|
||||
InlineDetach inlineDetach();
|
||||
|
||||
InlineSign inlineSign();
|
||||
|
||||
InlineVerify inlineVerify();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public interface AbstractSign<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provide the decryption password for the secret key.
|
||||
* Provide the password for the secret key used for signing.
|
||||
*
|
||||
* @param password password
|
||||
* @return builder instance
|
||||
|
@ -59,7 +59,7 @@ public interface AbstractSign<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provide the decryption password for the secret key.
|
||||
* Provide the password for the secret key used for signing.
|
||||
*
|
||||
* @param password password
|
||||
* @return builder instance
|
||||
|
|
|
@ -7,6 +7,7 @@ package sop.operation;
|
|||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import sop.Ready;
|
||||
import sop.enums.EncryptAs;
|
||||
|
@ -68,6 +69,24 @@ public interface Encrypt {
|
|||
return signWith(new ByteArrayInputStream(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide the password for the secret key used for signing.
|
||||
*
|
||||
* @param password password
|
||||
* @return builder instance
|
||||
*/
|
||||
default Encrypt withKeyPassword(String password) {
|
||||
return withKeyPassword(password.getBytes(Charset.forName("UTF8")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide the password for the secret key used for sigining.
|
||||
*
|
||||
* @param password password
|
||||
* @return builder instance
|
||||
*/
|
||||
Encrypt withKeyPassword(byte[] password);
|
||||
|
||||
/**
|
||||
* Encrypt with the given password.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue