Java Code Examples for sun.security.krb5.KrbCryptoException#initCause()
The following examples show how to use
sun.security.krb5.KrbCryptoException#initCause() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Des3CbcHmacSha1KdEType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException { try { return Des3.encrypt(key, usage, ivec, data, 0, data.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 2
Source File: Aes256CtsHmacSha1EType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) throws KrbApErrException, KrbCryptoException { try { return Aes256.decrypt(key, usage, ivec, cipher, 0, cipher.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 3
Source File: HmacSha1Aes256CksumType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Calculates keyed checksum. * @param data the data used to generate the checksum. * @param size length of the data. * @param key the key used to encrypt the checksum. * @return keyed checksum. */ public byte[] calculateChecksum(byte[] data, int size, byte[] key, int usage) throws KrbCryptoException { try { return Aes256.calculateChecksum(key, usage, data, 0, size); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 4
Source File: ArcFourHmacEType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) throws KrbApErrException, KrbCryptoException { try { return ArcFourHmac.decrypt(key, usage, ivec, cipher, 0, cipher.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 5
Source File: ArcFourHmacEType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException { try { return ArcFourHmac.encrypt(key, usage, ivec, data, 0, data.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 6
Source File: HmacSha1Des3KdCksumType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Calculates keyed checksum. * @param data the data used to generate the checksum. * @param size length of the data. * @param key the key used to encrypt the checksum. * @return keyed checksum. */ public byte[] calculateChecksum(byte[] data, int size, byte[] key, int usage) throws KrbCryptoException { try { return Des3.calculateChecksum(key, usage, data, 0, size); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 7
Source File: Aes128CtsHmacSha1EType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException { try { return Aes128.encrypt(key, usage, ivec, data, 0, data.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 8
Source File: HmacSha1Aes256CksumType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Verifies keyed checksum. * @param data the data. * @param size the length of data. * @param key the key used to encrypt the checksum. * @param checksum * @return true if verification is successful. */ public boolean verifyChecksum(byte[] data, int size, byte[] key, byte[] checksum, int usage) throws KrbCryptoException { try { byte[] newCksum = Aes256.calculateChecksum(key, usage, data, 0, size); return isChecksumEqual(checksum, newCksum); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 9
Source File: HmacSha1Aes256CksumType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Calculates keyed checksum. * @param data the data used to generate the checksum. * @param size length of the data. * @param key the key used to encrypt the checksum. * @return keyed checksum. */ public byte[] calculateChecksum(byte[] data, int size, byte[] key, int usage) throws KrbCryptoException { try { return Aes256.calculateChecksum(key, usage, data, 0, size); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 10
Source File: Des3CbcHmacSha1KdEType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) throws KrbApErrException, KrbCryptoException { try { return Des3.decrypt(key, usage, ivec, cipher, 0, cipher.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 11
Source File: ArcFourHmacEType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException { try { return ArcFourHmac.encrypt(key, usage, ivec, data, 0, data.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 12
Source File: HmacMd5ArcFourCksumType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Verifies keyed checksum. * @param data the data. * @param size the length of data. * @param key the key used to encrypt the checksum. * @param checksum * @return true if verification is successful. */ public boolean verifyChecksum(byte[] data, int size, byte[] key, byte[] checksum, int usage) throws KrbCryptoException { try { byte[] newCksum = ArcFourHmac.calculateChecksum(key, usage, data, 0, size); return isChecksumEqual(checksum, newCksum); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 13
Source File: HmacSha1Des3KdCksumType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Calculates keyed checksum. * @param data the data used to generate the checksum. * @param size length of the data. * @param key the key used to encrypt the checksum. * @return keyed checksum. */ public byte[] calculateChecksum(byte[] data, int size, byte[] key, int usage) throws KrbCryptoException { try { return Des3.calculateChecksum(key, usage, data, 0, size); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 14
Source File: HmacMd5ArcFourCksumType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Verifies keyed checksum. * @param data the data. * @param size the length of data. * @param key the key used to encrypt the checksum. * @param checksum * @return true if verification is successful. */ public boolean verifyChecksum(byte[] data, int size, byte[] key, byte[] checksum, int usage) throws KrbCryptoException { try { byte[] newCksum = ArcFourHmac.calculateChecksum(key, usage, data, 0, size); return isChecksumEqual(checksum, newCksum); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 15
Source File: Aes128CtsHmacSha1EType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) throws KrbApErrException, KrbCryptoException { try { return Aes128.decrypt(key, usage, ivec, cipher, 0, cipher.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 16
Source File: HmacSha1Des3KdCksumType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Verifies keyed checksum. * @param data the data. * @param size the length of data. * @param key the key used to encrypt the checksum. * @param checksum * @return true if verification is successful. */ public boolean verifyChecksum(byte[] data, int size, byte[] key, byte[] checksum, int usage) throws KrbCryptoException { try { byte[] newCksum = Des3.calculateChecksum(key, usage, data, 0, size); return isChecksumEqual(checksum, newCksum); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 17
Source File: HmacSha1Aes256CksumType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Verifies keyed checksum. * @param data the data. * @param size the length of data. * @param key the key used to encrypt the checksum. * @param checksum * @return true if verification is successful. */ public boolean verifyChecksum(byte[] data, int size, byte[] key, byte[] checksum, int usage) throws KrbCryptoException { try { byte[] newCksum = Aes256.calculateChecksum(key, usage, data, 0, size); return isChecksumEqual(checksum, newCksum); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 18
Source File: Aes128CtsHmacSha1EType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException { try { return Aes128.encrypt(key, usage, ivec, data, 0, data.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 19
Source File: Aes256CtsHmacSha1EType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException { try { return Aes256.encrypt(key, usage, ivec, data, 0, data.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }
Example 20
Source File: ArcFourHmacEType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) throws KrbApErrException, KrbCryptoException { try { return ArcFourHmac.decrypt(key, usage, ivec, cipher, 0, cipher.length); } catch (GeneralSecurityException e) { KrbCryptoException ke = new KrbCryptoException(e.getMessage()); ke.initCause(e); throw ke; } }