Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.security.jgss.jmod - Security JGSS Module
JDK 11 java.security.jgss.jmod is the JMOD file for JDK 11 Security JGSS (Java Generic Security Service) module.
JDK 11 Security JGSS module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.security.jgss.jmod.
JDK 11 Security JGSS module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Security JGSS module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.security.jgss.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ javax/security/auth/kerberos/KeyImpl.java
/* * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.security.auth.kerberos; import java.io.*; import java.util.Arrays; import javax.crypto.SecretKey; import javax.security.auth.Destroyable; import javax.security.auth.DestroyFailedException; import sun.security.util.HexDumpEncoder; import sun.security.krb5.Asn1Exception; import sun.security.krb5.PrincipalName; import sun.security.krb5.EncryptionKey; import sun.security.krb5.EncryptedData; import sun.security.krb5.KrbException; import sun.security.util.DerValue; /** * This class encapsulates a Kerberos encryption key. It is not associated * with a principal and may represent an ephemeral session key. * * @author Mayank Upadhyay * @since 1.4 * * @serial include */ class KeyImpl implements SecretKey, Destroyable, Serializable { private static final long serialVersionUID = -7889313790214321193L; private transient byte[] keyBytes; private transient int keyType; private transient volatile boolean destroyed = false; /** * Constructs a KeyImpl from the given bytes. * * @param keyBytes the raw bytes for the secret key * @param keyType the key type for the secret key as defined by the * Kerberos protocol specification. */ public KeyImpl(byte[] keyBytes, int keyType) { this.keyBytes = keyBytes.clone(); this.keyType = keyType; } /** * Constructs a KeyImpl from a password. * * @param principal the principal from which to derive the salt * @param password the password that should be used to compute the * key. * @param algorithm the name for the algorithm that this key wil be * used for. This parameter may be null in which case "DES" will be * assumed. */ public KeyImpl(KerberosPrincipal principal, char[] password, String algorithm) { try { PrincipalName princ = new PrincipalName(principal.getName()); EncryptionKey key; if ("none".equalsIgnoreCase(algorithm)) { key = EncryptionKey.NULL_KEY; } else { key = new EncryptionKey(password, princ.getSalt(), algorithm); } this.keyBytes = key.getBytes(); this.keyType = key.getEType(); } catch (KrbException e) { throw new IllegalArgumentException(e.getMessage()); } } /** * Returns the keyType for this key as defined in the Kerberos Spec. */ public final int getKeyType() { if (destroyed) throw new IllegalStateException("This key is no longer valid"); return keyType; } /* * Methods from java.security.Key */ public final String getAlgorithm() { return getAlgorithmName(keyType); } private String getAlgorithmName(int eType) { if (destroyed) throw new IllegalStateException("This key is no longer valid"); switch (eType) { case EncryptedData.ETYPE_DES_CBC_CRC: return "des-cbc-crc"; case EncryptedData.ETYPE_DES_CBC_MD5: return "des-cbc-md5"; case EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD: return "des3-cbc-sha1-kd"; case EncryptedData.ETYPE_ARCFOUR_HMAC: return "rc4-hmac"; case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96: return "aes128-cts-hmac-sha1-96"; case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96: return "aes256-cts-hmac-sha1-96"; case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128: return "aes128-cts-hmac-sha256-128"; case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192: return "aes256-cts-hmac-sha384-192"; case EncryptedData.ETYPE_NULL: return "none"; default: return eType > 0 ? "unknown" : "private"; } } public final String getFormat() { if (destroyed) throw new IllegalStateException("This key is no longer valid"); return "RAW"; } public final byte[] getEncoded() { if (destroyed) throw new IllegalStateException("This key is no longer valid"); return keyBytes.clone(); } public void destroy() throws DestroyFailedException { if (!destroyed) { destroyed = true; Arrays.fill(keyBytes, (byte) 0); } } public boolean isDestroyed() { return destroyed; } /** * @serialData this {@code KeyImpl} is serialized by * writing out the ASN1 Encoded bytes of the encryption key. * The ASN1 encoding is defined in RFC4120 and as follows: * EncryptionKey ::= SEQUENCE { * keytype [0] Int32 -- actually encryption type --, * keyvalue [1] OCTET STRING * } */ private void writeObject(ObjectOutputStream ois) throws IOException { if (destroyed) { throw new IOException("This key is no longer valid"); } try { ois.writeObject((new EncryptionKey(keyType, keyBytes)).asn1Encode()); } catch (Asn1Exception ae) { throw new IOException(ae.getMessage()); } } private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { try { EncryptionKey encKey = new EncryptionKey(new DerValue((byte[])ois.readObject())); keyType = encKey.getEType(); keyBytes = encKey.getBytes(); } catch (Asn1Exception ae) { throw new IOException(ae.getMessage()); } } public String toString() { HexDumpEncoder hd = new HexDumpEncoder(); return "EncryptionKey: keyType=" + keyType + " keyBytes (hex dump)=" + (keyBytes == null || keyBytes.length == 0 ? " Empty Key" : '\n' + hd.encodeBuffer(keyBytes) + '\n'); } public int hashCode() { int result = 17; if(isDestroyed()) { return result; } result = 37 * result + Arrays.hashCode(keyBytes); return 37 * result + keyType; } public boolean equals(Object other) { if (other == this) return true; if (! (other instanceof KeyImpl)) { return false; } KeyImpl otherKey = ((KeyImpl) other); if (isDestroyed() || otherKey.isDestroyed()) { return false; } if(keyType != otherKey.getKeyType() || !Arrays.equals(keyBytes, otherKey.getEncoded())) { return false; } return true; } }
⏎ javax/security/auth/kerberos/KeyImpl.java
Or download all of them as a single archive file:
File name: java.security.jgss-11.0.1-src.zip File size: 216236 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.security.sasl.jmod - Security SASL Module
2020-09-15, 29765👍, 0💬
Popular Posts:
JDK 11 jdk.internal.opt.jmod is the JMOD file for JDK 11 Internal Opt module. JDK 11 Internal Opt mo...
JRE 5 sunjce_provider.jar is the JAR file for JRE 5 Sun JCE Provider, which provides implementations...
What Is wstx-asl-3.2.8.jar? wstx-asl-3.2.8.jar is JAR file for the ASL component of Woodstox 3.2.8. ...
Jettison is a collection of Java APIs (like STaX and DOM) which read and write JSON. This allows nea...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...