Bruce
Search…
Cheat Sheet
This is a list of all available methods. Please refer to the detailed documentation for further info.
1
// supported encodings
2
public enum Encoding { HEX, BASE64, URL, MIME };
3
4
// keystore methods
5
KeyStore keystore();
6
KeyStore keystore(String type);
7
KeyStore keystore(String location, char[] password);
8
KeyStore keystore(String location, char[] password, String type);
9
KeyStore keystore(String location, char[] password, String type, String provider);
10
11
// certificate methods
12
Certificate certificate(KeyStore keystore, String alias);
13
14
// key methods
15
PublicKey publicKey(KeyStore keystore, String alias);
16
PrivateKey privateKey(KeyStore keystore, String alias, char[] password);
17
Key secretKey(KeyStore keystore, String alias, String char[]);
18
KeyPair keyPair(String algorithm, int keySize);
19
KeyPair keyPair(String algorithm, String provider, int keySize);
20
KeyPair keyPair(String algorithm, int keySize, SecureRandom random);
21
KeyPair keyPair(String algorithm, String provider, int keySize, SecureRandom random);
22
byte[] symmetricKey(String algorithm);
23
byte[] symmetricKey(String algorithm, String provider);
24
String symmetricKey(String algorithm, Encoding encoding);
25
String symmetricKey(String algorithm, String provider, Encoding encoding);
26
27
// message digest methods
28
Digester digester(String algorithm, String provider);
29
Digester digester(String algorithm);
30
EncodingDigester digester(String algorithm, Encoding encoding);
31
EncodingDigester digester(String algorithm, Encoding encoding, Charset charset);
32
EncodingDigester digester(String algorithm, String provider, Encoding encoding);
33
EncodingDigester digester(String algorithm, String provider, Encoding encoding, Charset charset);
34
35
// signature methods
36
Signer signer(PrivateKey privateKey, String algorithm);
37
Signer signer(PrivateKey privateKey, String algorithm, String provider);
38
SignerByKey signer(Map<String, PrivateKey> privateKeyMap, String algorithm);
39
SignerByKey signer(Map<String, PrivateKey> privateKeyMap, String algorithm, String provider);
40
EncodingSigner signer(PrivateKey privateKey, String algorithm, Encoding encoding);
41
EncodingSigner signer(PrivateKey privateKey, String algorithm, Charset charset, Encoding encoding);
42
EncodingSigner signer(PrivateKey privateKey, String algorithm, String provider, Charset charset, Encoding encoding);
43
44
// verification methods
45
Verifier verifier(PublicKey publicKey, String algorithm);
46
Verifier verifier(PublicKey publicKey, String algorithm, String provider);
47
VerifierByKey verifier(Map<String, PublicKey> publicKeyMap, String algorithm);
48
VerifierByKey verifier(Map<String, PublicKey> publicKeyMap, String algorithm, String provider);
49
EncodingVerifier verifier(PublicKey publicKey, String algorithm, Encoding encoding);
50
EncodingVerifier verifier(PublicKey publicKey, String algorithm, String provider, Encoding encoding);
51
EncodingVerifier verifier(PublicKey publicKey, String algorithm, String provider, Charset charset, Encoding encoding);
52
53
// symmetric ciphers
54
Cipher cipher(byte[] key, String keyAlgorithm, String cipherAlgorithm, Mode mode);
55
Cipher cipher(byte[] key, String keyAlgorithm, String cipherAlgorithm, String provider, Mode mode);
56
EncodingCipher cipher(String key, String keyAlgorithm, String cipherAlgorithm, Mode mode, Charset charset, Encoding encoding);
57
EncodingCipher cipher(String key, String keyAlgorithm, String cipherAlgorithm, String provider, Mode mode, Charset charset, Encoding encoding);
58
CipherByKey cipher(String keyAlgorithm, String cipherAlgorithm, Mode mode);
59
CipherByKey cipher(String keyAlgorithm, String cipherAlgorithm, String provider, Mode mode);
60
EncodingCipherByKey cipherByKey(String keyAlgorithm, String cipherAlgorithm, Mode mode, Charset charset);
61
EncodingCipherByKey cipherByKey(String keyAlgorithm, String cipherAlgorithm, String provider, Mode mode, Charset charset);
62
63
// asymmetric ciphers
64
Cipher cipher(Key key, String algorithm, Mode mode);
65
Cipher cipher(Key key, String algorithm, String provider, Mode mode);
66
EncodingCipher cipher(Key key, String algorithm, Mode mode, Encoding encoding, Charset charset);
67
EncodingCipher cipher(Key key, String algorithm, String provider, Mode mode, Encoding encoding, Charset charset);
68
CipherByKey cipher(Map<String, Key> keys, String algorithm);
69
CipherByKey cipher(Map<String, Key> keys, String algorithm, String provider);
70
EncodingCipherByKey cipher(Map<String, Key> keys, String algorithm, Encoding encoding, Charset charset);
71
EncodingCipherByKey cipher(Map<String, Key> keys, String algorithm, String provider, Encoding encoding, Charset charset);
72
73
// message authentication codes
74
Mac mac(Key key, String algorithm);
75
Mac mac(Key key, String algorithm, String provider);
76
EncodingMac mac(Key key, String algorithm, Encoding encoding, Charset charset);
77
EncodingMac mac(Key key, String algorithm, String provider, Encoding encoding, Charset charset);
Copied!
Last modified 6mo ago
Export as PDF
Copy link