Searched defs:salt (Results 1 - 22 of 22) sorted by relevance

/openjdk7/jdk/src/share/classes/javax/crypto/spec/
H A DPBEParameterSpec.java43 private byte[] salt; field in class:PBEParameterSpec
50 * @param salt the salt. The contents of <code>salt</code> are copied
53 * @exception NullPointerException if <code>salt</code> is null.
55 public PBEParameterSpec(byte[] salt, int iterationCount) { argument
56 this.salt = (byte[])salt.clone();
61 * Returns the salt.
63 * @return the salt
[all...]
H A DPBEKeySpec.java66 private byte[] salt = null; field in class:PBEKeySpec
89 * Constructor that takes a password, salt, iteration count, and
94 * <p> Note: the <code>password</code> and <code>salt</code>
99 * @param salt the salt.
102 * @exception NullPointerException if <code>salt</code> is null.
103 * @exception IllegalArgumentException if <code>salt</code> is empty,
107 public PBEKeySpec(char[] password, byte[] salt, int iterationCount, argument
114 if (salt == null) {
115 throw new NullPointerException("the salt paramete
150 PBEKeySpec(char[] password, byte[] salt, int iterationCount) argument
[all...]
/openjdk7/jdk/src/share/classes/com/sun/crypto/provider/
H A DPBEParameters.java45 * salt OCTET STRING SIZE(8),
55 // the salt
56 private byte[] salt = null; field in class:PBEParameters
68 this.salt = (byte[])((PBEParameterSpec)paramSpec).getSalt().clone();
83 this.salt = val.data.getOctetString();
105 return new PBEParameterSpec(this.salt, this.iCount);
116 bytes.putOctetString(this.salt);
134 String saltString = LINE_SEP + " salt:" + LINE_SEP + "[";
136 saltString += encoder.encodeBuffer(salt);
H A DPBKDF2KeyImpl.java47 * 2) salt, iteration count, and to be derived key length are supplied
57 private byte[] salt; field in class:PBKDF2KeyImpl
92 this.salt = keySpec.getSalt();
93 if (salt == null) {
121 this.key = deriveKey(prf, passwdBytes, salt, iterCount, keyLength);
125 byte[] salt, int iterCount, int keyLengthInBit) {
167 prf.update(salt);
213 return salt.clone();
124 deriveKey(final Mac prf, final byte[] password, byte[] salt, int iterCount, int keyLengthInBit) argument
H A DPBECipherCore.java50 private byte[] salt = null; field in class:PBECipherCore
166 if (salt == null) {
167 salt = new byte[8];
168 SunJCE.RANDOM.nextBytes(salt);
170 PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
228 // create random salt and use default iteration count
229 salt = new byte[8];
230 random.nextBytes(salt);
236 salt = ((PBEParameterSpec) params).getSalt();
237 // salt mus
[all...]
H A DPKCS12PBECipherCore.java51 private byte[] salt = null; field in class:PKCS12PBECipherCore
61 static byte[] derive(char[] chars, byte[] salt, argument
82 int s = roundup(salt.length, v);
88 concat(salt, I, 0, s);
203 if (salt == null) {
206 // section B.4 to generate salt and iCount.
207 salt = new byte[DEFAULT_SALT_LENGTH];
208 SunJCE.RANDOM.nextBytes(salt);
211 PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
233 salt
[all...]
/openjdk7/jdk/src/share/classes/sun/security/krb5/internal/
H A DETypeInfo.java38 * salt [1] OCTET STRING OPTIONAL
47 private String salt = null; field in class:ETypeInfo
55 public ETypeInfo(int etype, String salt) { argument
57 this.salt = salt;
61 return new ETypeInfo(etype, salt);
86 // salt
92 // Although salt is defined as an OCTET STRING, it's the
95 // "The salt, ..., is also completely unspecified with respect
102 this.salt
[all...]
H A DETypeInfo2.java38 * salt [1] KerberosString OPTIONAL,
58 public ETypeInfo2(int etype, String salt, byte[] s2kparams) { argument
60 this.saltStr = salt;
100 // salt
H A DPAData.java189 * A place to store a pair of salt and s2kparams.
190 * An empty salt is changed to null, to be interoperable
194 public final String salt; field in class:PAData.SaltAndParams
198 this.salt = s;
204 * Fetches salt and s2kparams value for eType in a series of PA-DATAs.
210 * @return salt and s2kparams. can be null if not found
279 .append(", salt = ")
297 .append(", salt = ")
/openjdk7/jdk/test/com/sun/crypto/provider/Cipher/PBE/
H A DPKCS12Cipher.java98 byte[] salt; field in class:MyPBEKey
100 MyPBEKey(char[] passwd, byte[] salt, int iCount) { argument
102 this.salt = salt;
106 public byte[] getSalt() { return salt; }
H A DPKCS12CipherKAT.java99 private final byte[] salt; field in class:PKCS12CipherKAT.CipherTest
103 char[] password, byte[] salt, int ic) {
108 this.salt = salt;
132 PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, ic);
143 System.out.println("salt: " + hexDump(salt));
158 System.out.println("salt: " + hexDump(salt));
167 String salt, in
102 CipherTest(String alg, byte[] plaintext, byte[] ciphertext, char[] password, byte[] salt, int ic) argument
166 t(String alg, String plaintext, char[] password, String salt, int iterationCount, String ciphertext) argument
[all...]
/openjdk7/jdk/test/com/sun/crypto/provider/Mac/
H A DHmacSaltLengths.java27 * @summary ensures various salt lengths can be used for
49 System.out.println("testing parameters with 4-byte salt...");
59 System.out.println("testing parameters with 8-byte salt...");
64 System.out.println("testing parameters with 20-byte salt...");
69 System.out.println("testing parameters with 30-byte salt...");
93 byte[] salt; field in class:MyPBEKey
95 MyPBEKey(char[] passwd, byte[] salt, int iCount) { argument
97 this.salt = salt;
101 public byte[] getSalt() { return salt; }
[all...]
/openjdk7/jdk/src/share/classes/sun/security/pkcs12/
H A DMacData.java74 // Get the salt.
85 MacData(String algName, byte[] digest, byte[] salt, int iterations) argument
106 this.macSalt = salt;
116 byte[] salt, int iterations) throws NoSuchAlgorithmException
136 this.macSalt = salt;
185 // encode salt
115 MacData(AlgorithmParameters algParams, byte[] digest, byte[] salt, int iterations) argument
/openjdk7/jdk/test/com/sun/crypto/provider/KeyFactory/
H A DPBKDF2HmacSHA1FactoryTest.java168 TestVector(int iterCount, String password, byte[] salt, argument
170 init(iterCount, password, salt, expectedVal);
172 private void init(int iterCount, String password, byte[] salt, argument
181 salt, iterCount, keySize);
/openjdk7/jdk/src/share/classes/sun/security/krb5/internal/crypto/
H A DAes128.java44 public static byte[] stringToKey(char[] password, String salt, byte[] params) argument
46 return CRYPTO.stringToKey(password, salt, params);
H A DAes256.java44 public static byte[] stringToKey(char[] password, String salt, byte[] params) argument
46 return CRYPTO.stringToKey(password, salt, params);
/openjdk7/jdk/src/share/classes/com/sun/security/auth/module/
H A DCrypt.java43 * the set [a-zA-Z0-9./]. the salt string is used to perturb
48 * alphabet as the salt. The first two characters are the salt
294 * @param salt the salt to use.
297 * password. The first two characters are the salt.
301 public synchronized byte[] crypt(byte[] pw, byte[] salt) { argument
326 c = salt[i];
373 * the salt to use. The salt shoul
[all...]
/openjdk7/jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/
H A DDes3DkCrypto.java52 public byte[] stringToKey(char[] salt) throws GeneralSecurityException { argument
55 saltUtf8 = charToUtf8(salt);
61 // Caller responsible for clearing its own salt
H A DAesDkCrypto.java102 public byte[] stringToKey(char[] password, String salt, byte[] s2kparams) argument
107 saltUtf8 = salt.getBytes("UTF-8");
118 private byte[] stringToKey(char[] secret, byte[] salt, byte[] params) argument
129 byte[] tmpKey = randomToKey(PBKDF2(secret, salt, iter_count,
477 private static byte[] PBKDF2(char[] secret, byte[] salt, argument
480 PBEKeySpec keySpec = new PBEKeySpec(secret, salt, count, keyLength);
/openjdk7/jdk/src/share/classes/sun/security/krb5/
H A DEncryptionKey.java154 * Obtains a key for a given etype of a principal with possible new salt
165 String salt;
168 salt = snp.salt != null ? snp.salt : cname.getSalt();
171 salt = cname.getSalt();
174 return acquireSecretKey(password, salt, etype, s2kparams);
178 * Obtains a key for a given etype with salt and optional s2kparams
180 * @param salt NOT null
186 String salt, in
185 acquireSecretKey(char[] password, String salt, int etype, byte[] s2kparams) argument
207 acquireSecretKeys(char[] password, String salt) argument
261 stringToKey(char[] password, String salt, byte[] s2kparams, int keyType) argument
303 EncryptionKey(char[] password, String salt, String algorithm) argument
[all...]
H A DPrincipalName.java104 // cached salt, might be changed by KDC info, not used in clone
105 private String salt = null; field in class:PrincipalName
495 if (salt == null) {
496 StringBuffer salt = new StringBuffer();
498 salt.append(nameRealm.toString());
501 salt.append(nameStrings[i]);
503 return salt.toString();
505 return salt;
/openjdk7/jdk/test/sun/security/krb5/auto/
H A DKDC.java134 // can still locate the principal and give back correct salt.
178 * Multiple ETYPE-INFO-ENTRY with same etype but different salt
523 * Returns the salt string for the principal.
525 * @return the salt
1347 private static byte[] EncryptionKeyDotStringToKey(char[] password, String salt, argument
1351 null, password, salt, s2kparams, keyType);

Completed in 94 milliseconds