MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / Key

Method Key

CodenameOne/src/com/codename1/security/Key.java:49–60  ·  view source on GitHub ↗
(String algorithm, byte[] encoded, String format)

Source from the content-addressed store, hash-verified

47 ///
48 /// - `format`: encoding format identifier ("RAW", "X.509", "PKCS#8")
49 protected Key(String algorithm, byte[] encoded, String format) {
50 if (algorithm == null) {
51 throw new CryptoException("algorithm must not be null");
52 }
53 if (encoded == null) {
54 throw new CryptoException("encoded must not be null");
55 }
56 this.algorithm = algorithm;
57 this.encoded = new byte[encoded.length];
58 System.arraycopy(encoded, 0, this.encoded, 0, encoded.length);
59 this.format = format;
60 }
61
62 /// Returns a fresh copy of the encoded key bytes. Treat returns from
63 /// private keys as sensitive material -- do not log or store

Callers

nothing calls this directly

Calls 1

arraycopyMethod · 0.95

Tested by

no test coverage detected