/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * @since 1.308 * @deprecated * See {@link #getSecretKey()}. */ @Deprecated public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Turns {@link Jenkins#getSecretKey()} into an AES key. * * @deprecated * This is no longer the key we use to encrypt new information, but we still need this * to be able to decrypt what's already persisted. */ @Deprecated /*package*/ static SecretKey getLegacyKey() throws GeneralSecurityException { String secret = Secret.SECRET; if(secret==null) return Jenkins.getInstance().getSecretKeyAsAES128(); return Util.toAes128Key(secret); }
public DefaultConfidentialStore(File rootDir) throws IOException, InterruptedException { this.rootDir = rootDir; if (rootDir.mkdirs()) { // protect this directory. but don't change the permission of the existing directory // in case the administrator changed this. new FilePath(rootDir).chmod(0700); } TextFile masterSecret = new TextFile(new File(rootDir,"master.key")); if (!masterSecret.exists()) { // we are only going to use small number of bits (since export control limits AES key length) // but let's generate a long enough key anyway masterSecret.write(Util.toHexString(randomBytes(128))); } this.masterKey = Util.toAes128Key(masterSecret.readTrim()); }
/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * @since 1.308 */ public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * * @since 1.308 */ public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * @since 1.308 */ public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * @since 1.308 */ public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * @since 1.308 * @deprecated * See {@link #getSecretKey()}. */ public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Gets {@linkplain #getSecretKey() the secret key} as a key for AES-128. * @since 1.308 * @deprecated * See {@link #getSecretKey()}. */ @Deprecated public SecretKey getSecretKeyAsAES128() { return Util.toAes128Key(secretKey); }
/** * Turns {@link Jenkins#getSecretKey()} into an AES key. * * @deprecated * This is no longer the key we use to encrypt new information, but we still need this * to be able to decrypt what's already persisted. */ @Deprecated /*package*/ static SecretKey getLegacyKey() throws GeneralSecurityException { String secret = Secret.SECRET; if(secret==null) return Jenkins.getInstance().getSecretKeyAsAES128(); return Util.toAes128Key(secret); }
/** * Turns {@link Hudson#getSecretKey()} into an AES key. */ private static SecretKey getKey() throws UnsupportedEncodingException, GeneralSecurityException { String secret = SECRET; if(secret==null) return Hudson.getInstance().getSecretKeyAsAES128(); return Util.toAes128Key(secret); }
/** * Turns {@link Hudson#getSecretKey()} into an AES key. */ private static SecretKey getKey() throws UnsupportedEncodingException, GeneralSecurityException { String secret = SECRET; if(secret==null) return Hudson.getInstance().getSecretKeyAsAES128(); return Util.toAes128Key(secret); }
/** * Turns {@link Hudson#getSecretKey()} into an AES key. */ private static SecretKey getKey() throws UnsupportedEncodingException, GeneralSecurityException { String secret = SECRET; if (secret == null) { return Hudson.getInstance().getSecretKeyAsAES128(); } return Util.toAes128Key(secret); }
/** * Turns {@link Hudson#getSecretKey()} into an AES key. */ private static SecretKey getKey() throws UnsupportedEncodingException, GeneralSecurityException { String secret = SECRET; if(secret==null) return Hudson.getInstance().getSecretKeyAsAES128(); return Util.toAes128Key(secret); }
public DefaultConfidentialStore(File rootDir) throws IOException, InterruptedException { this.rootDir = rootDir; if (rootDir.mkdirs()) { // protect this directory. but don't change the permission of the existing directory // in case the administrator changed this. new FilePath(rootDir).chmod(0700); } TextFile masterSecret = new TextFile(new File(rootDir,"master.key")); if (!masterSecret.exists()) { // we are only going to use small number of bits (since export control limits AES key length) // but let's generate a long enough key anyway masterSecret.write(Util.toHexString(randomBytes(128))); } this.masterKey = Util.toAes128Key(masterSecret.readTrim()); }